class Hamlit::Filters::Preserve
Public Instance Methods
compile(node)
click to toggle source
# File lib/hamlit/filters/preserve.rb, line 4 def compile(node) text = node.value[:text].rstrip + "\n" text = text.gsub("\n", '
') compile_text(text) end
Private Instance Methods
compile_text(text)
click to toggle source
# File lib/hamlit/filters/preserve.rb, line 12 def compile_text(text) if ::Hamlit::HamlUtil.contains_interpolation?(text) [:dynamic, ::Hamlit::HamlUtil.slow_unescape_interpolation(text)] else [:static, text] end end