Class Hpricot::Comment
In: lib/haml/html.rb
Parent: Object

@see Hpricot @private

Methods

to_haml  

Public Instance methods

@see Haml::HTML::Node#to_haml

[Source]

     # File lib/haml/html.rb, line 231
231:       def to_haml(tabs, options)
232:         content = self.content
233:         if content =~ /\A(\[[^\]]+\])>(.*)<!\[endif\]\z/m
234:           condition = $1
235:           content = $2
236:         end
237: 
238:         if content.include?("\n")
239:           "#{tabulate(tabs)}/#{condition}\n#{parse_text(content, tabs + 1)}"
240:         else
241:           "#{tabulate(tabs)}/#{condition} #{content.strip}\n"
242:         end
243:       end

[Validate]