Class: FastHaml::FilterCompilers::Cdata

Inherits:
Base
  • Object
show all
Defined in:
lib/fast_haml/filter_compilers/cdata.rb

Instance Method Summary collapse

Methods inherited from Base

#need_newline?

Instance Method Details

#compile(texts) ⇒ Object



6
7
8
9
10
# File 'lib/fast_haml/filter_compilers/cdata.rb', line 6

def compile(texts)
  temple = [:multi, [:static, "<![CDATA[\n"], [:newline]]
  compile_texts(temple, texts, tab_width: 4)
  temple << [:static, "\n]]>"]
end