You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This turns out to be painfully complicated to get right, SingleLineHTMLCloseComment is a lot more subtle than it appears at first glance.
Since the parser doesn't consume scripts line-by-line but rather in (possibly) larger contextual chunks, and because it does not track previous contexts that have appeared on a line, it is not immediately obvious how to determine if any content preceding the --> token fits SingleLineDelimitedCommentSequence, especially if other content on the line is in another state which was processed before we even get to the --> token (i.e. var a = "asd" --> comment? is complex, as tJS will be passed var a = "asd" --> comment? and then --> comment?, meaning by the time we get to the close comment token, we have no information about the preceding contexts to make our decision on if this is a valid comment or not).