Class: Haml::Filters::Preserve

Inherits:
Base
  • Object
show all
Defined in:
lib/haml/filters/preserve.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

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

Instance Method Details

#compile(node)



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

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