Method: WAX#comment

Defined in:
lib/wax.rb

#comment(text) ⇒ Object

Writes a comment (<!– text –>). The comment text cannot contain “–”.



175
176
177
178
179
180
181
182
183
184
185
186
187
188
# File 'lib/wax.rb', line 175

def comment(text)
  # Comments can be output in any state.

  XMLUtil.verify_comment(text) if @check_me
      
  @has_content = @has_indented_content = true
  terminate_start
  write_indent if @parent_stack.size > 0

  out "<!-- #{text} -->"
  out "#{@cr}" if will_indent and @parent_stack.size == 0

  self
end