class HTML::Tokenizer

def update_current_line(text)

accordingly.
Counts the number of newlines in the text and updates the current line
def update_current_line(text)
  text.scan(/\r?\n/) { @current_line += 1 }
end