module Haml::Precompiler
def render_comment(line)
def render_comment(line) conditional, line = balance(line, ?[, ?]) if line[0] == ?[ line.strip! conditional << ">" if conditional if block_opened? && !line.empty? raise SyntaxError.new('Illegal nesting: nesting within a tag that already has content is illegal.', @next_line.index) end open = "<!--#{conditional}" # Render it statically if possible unless line.empty? return push_text("#{open} #{line} #{conditional ? "<![endif]-->" : "-->"}") end push_text(open, 1) @output_tabs += 1 push_and_tabulate([:comment, !conditional.nil?]) unless line.empty? push_text(line) close end end