Module: Hamlit::Compilers::Comment

Included in:
Hamlit::Compiler
Defined in:
lib/hamlit/compilers/comment.rb

Instance Method Summary collapse

Instance Method Details

#on_haml_comment(condition, exps) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/hamlit/compilers/comment.rb', line 4

def on_haml_comment(condition, exps)
  content = [:multi]
  content << [:static, "#{condition}>\n"]
  content += exps.map { |exp| compile(exp) }
  content << [:static, "<![endif]"]
  [:html, :comment, content]
end