| Class | Hpricot::Comment |
| In: |
lib/haml/html.rb
|
| Parent: | Object |
@see Haml::HTML::Node#to_haml
# File lib/haml/html.rb, line 238
238: def to_haml(tabs, options)
239: content = self.content
240: if content =~ /\A(\[[^\]]+\])>(.*)<!\[endif\]\z/m
241: condition = $1
242: content = $2
243: end
244:
245: if content.include?("\n")
246: "#{tabulate(tabs)}/#{condition}\n#{parse_text(content, tabs + 1)}"
247: else
248: "#{tabulate(tabs)}/#{condition} #{content.strip}\n"
249: end
250: end