Sha256: e7a3cc3e20f3307ddc8df0930bcf5f408b79653e9e79f34b29517368fcf902af
Contents?: true
Size: 496 Bytes
Versions: 36
Compression:
Stored size: 496 Bytes
Contents
# frozen_string_literal: true 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
36 entries across 36 versions & 1 rubygems