Module | Haml::HTML::Node |
In: |
lib/haml/html.rb
|
A module containing utility methods that every Hpricot node should have.
# File lib/haml/html.rb, line 30 30: def parse_text(text, tabs) 31: text.strip! 32: text.gsub!('#{', '\#{') #' 33: if text.empty? 34: String.new 35: else 36: lines = text.split("\n") 37: 38: lines.map do |line| 39: line.strip! 40: "#{tabulate(tabs)}#{'\\' if Haml::Engine::SPECIAL_CHARACTERS.include?(line[0])}#{line}\n" 41: end.join 42: end 43: end