Class: Hamlit::Filters::Preserve

Inherits:
Base show all
Defined in:
lib/hamlit/filters/preserve.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Hamlit::Filters::Base

Instance Method Details

#compile(node) ⇒ Object


5
6
7
8
9
# File 'lib/hamlit/filters/preserve.rb', line 5

def compile(node)
  text = node.value[:text].rstrip + "\n"
  text = text.gsub("\n", '
')
  compile_text(text)
end