mozilla/webvtt — pull request #309 by caitp (2013-03-28 12:28:28+00:00)
Title: [bug] Reset lexer state when returning NEWLINE in webvtt_lex_newline()

The tests don't really check for this currently, but it's kind of required for simplicity (Otherwise, parse_timestamp() will see a timestam starting with \n or \r or \r\n, and not parse successfully)

set `self->tstate = L_START` when tstate == L_NEWLINE0 and returning NEWLINE token.

--

Should also add these checks to each of the unit tests to ensure good behaviour in all cases.