Class: FastHaml::FilterCompilers::Plain
- Defined in:
- lib/fast_haml/filter_compilers/plain.rb
Instance Method Summary collapse
Instance Method Details
#compile(texts) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/fast_haml/filter_compilers/plain.rb', line 6 def compile(texts) temple = [:multi, [:newline]] texts = strip_last_empty_lines(texts) texts.each do |text| temple << text_compiler.compile(text) unless texts.last.equal?(text) temple << [:static, "\n"] << [:newline] end end temple end |