HTML comments (to my knowledge) can only end with -->. Currently, the dash count is not reset when a > is seen, so the parser will accept ->-> as closing the comment (this can be seen in Atom).
The change removes the break keyword, so it will continue into the default behaviour and reset the dash count. I considered adding dashes = 0 above instead, but removing break felt cleaner.
HTML comments (to my knowledge) can only end with
-->
. Currently, the dash count is not reset when a>
is seen, so the parser will accept->->
as closing the comment (this can be seen in Atom).The change removes the
break
keyword, so it will continue into the default behaviour and reset the dash count. I considered addingdashes = 0
above instead, but removingbreak
felt cleaner.Also added tests to prevent regressions.