Method: HTML5::HTMLTokenizer#comment_state

Defined in:
lib/feed_tools/vendor/html5/lib/html5/tokenizer.rb

#comment_stateObject



657
658
659
660
661
662
663
664
665
666
667
668
669
# File 'lib/feed_tools/vendor/html5/lib/html5/tokenizer.rb', line 657

def comment_state
  data = @stream.char
  if data == "-"
    @state = :comment_end_dash_state
  elsif data == :EOF
    @token_queue << {:type => :ParseError, :data => "eof-in-comment"}
    @token_queue << @current_token
    @state = :data_state
  else
    @current_token[:data] += data + @stream.chars_until("-")
  end
  return true
end