Sha256: 9ee0d0397cbc9e3181ef5eaeb7e2ca803fd9a440c483292d4583be7190052544
Contents?: true
Size: 466 Bytes
Versions: 18
Compression:
Stored size: 466 Bytes
Contents
module Hamlit class Filters class Preserve < Base def compile(node) text = node.value[:text].rstrip + "\n" text = text.gsub("\n", '
') compile_text(text) end private def compile_text(text) if ::Hamlit::HamlUtil.contains_interpolation?(text) [:dynamic, ::Hamlit::HamlUtil.slow_unescape_interpolation(text)] else [:static, text] end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems