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
VS Code currently recognizes CRLF, CR and LF as end-of-line sequences.
But programming languages have different definitions for what constitutes a line terminator. Here is a summary from some of the specifications I found:
Some language servers might use their specification variant for what a line is, so the (line,char) coordinates used for document change events, reference positions, diagnostics etc. might be off for files containing LS, PS, or NEL.
Since the characters LS, PS, or NEL are very rarely used in practice, and most likely they appear unintentionally in source code (through copy-pasting), I suggest we prompt users when such a file is opened and ask them to "fix" the line terminators for the file. Fixing would mean to replace LS, PS, or NEL with the current configured EOL sequence.
The text was updated successfully, but these errors were encountered:
Extracted from microsoft/TypeScript#38078
VS Code currently recognizes CRLF, CR and LF as end-of-line sequences.
But programming languages have different definitions for what constitutes a line terminator. Here is a summary from some of the specifications I found:
Specifications:
Some language servers might use their specification variant for what a line is, so the
(line,char)
coordinates used for document change events, reference positions, diagnostics etc. might be off for files containingLS
,PS
, orNEL
.Since the characters
LS
,PS
, orNEL
are very rarely used in practice, and most likely they appear unintentionally in source code (through copy-pasting), I suggest we prompt users when such a file is opened and ask them to "fix" the line terminators for the file. Fixing would mean to replaceLS
,PS
, orNEL
with the current configured EOL sequence.The text was updated successfully, but these errors were encountered: