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

@see Hpricot @private

### Methods

to_haml

### Public Instance methods

to_haml(tabs, options)

@see Haml::HTML::Node#to_haml

[Source]

         # File lib/haml/html.rb, line 214
    214:       def to_haml(tabs, options)
    215:         content = self.content
    216:         if content =~ /\A(\[[^\]]+\])>(.*)<!\[endif\]\z/m
    217:           condition = $1
    218:           content = $2
    219:         end
    220:
    221:         if content.include?("\n")
    222:           "#{tabulate(tabs)}/#{condition}\n#{parse_text(content, tabs + 1)}"
    223:         else
    224:           "#{tabulate(tabs)}/#{condition} #{content.strip}"
    225:         end
    226:       end

[Validate]