class Hpricot::Comment
@private
@see Hpricot
def to_haml(tabs, options)
- See: Haml::HTML::Node#to_haml -
def to_haml(tabs, options) content = self.content if content =~ /\A(\[[^\]]+\])>(.*)<!\[endif\]\z/m condition = $1 content = $2 end if content.include?("\n") "#{tabulate(tabs)}/#{condition}\n#{parse_text(content, tabs + 1)}" else "#{tabulate(tabs)}/#{condition} #{content.strip}" end end