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
When a \r rune is encountered, it is immediately considered a newline and the line is progressed, even though the following \n is also part of the CRLF sequence. Removing \r from the case resolves this bug.
When source containing Windows line endings is tokenized, the line numbers can be incorrect.
Given this file:
This list of tokens is generated:
Note that each line is numbered
1
,3
, and5
respectively.With Windows line endings replaced with Unix line endings, the lines are numbered correctly:
You can add Windows line endings by running this sed expression against the input file:
And remove them with this:
Code to reproduce:
The text was updated successfully, but these errors were encountered: