Skip to content

Editorial: move non-normative statements about CRLF to a note#3807

Open
michaelficarra wants to merge 2 commits intomainfrom
crlf
Open

Editorial: move non-normative statements about CRLF to a note#3807
michaelficarra wants to merge 2 commits intomainfrom
crlf

Conversation

@michaelficarra
Copy link
Copy Markdown
Member

@michaelficarra michaelficarra commented Apr 8, 2026

Also clarified that it's not a "single |SourceCharacter|", whatever that means. It's a single logical line terminator.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

The rendered spec preview for this PR is available as a single page at https://tc39.es/ecma262/pr/3807 and as multiple pages at https://tc39.es/ecma262/pr/3807/multipage .

Comment thread spec.html
<CR> <LF>
</emu-grammar>
<emu-note>
<p>The production <emu-grammar>LineTerminatorSequence :: &lt;CR&gt; &lt;LF&gt;</emu-grammar> matches a sequence of code points that should collectively operate as a single line terminator, such as when reporting line numbers in diagnostics.</p>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line terminator is defined as a set of four single code points, we should not be conflating it with line terminator sequence and claim multiple code points can be one line terminator. Something like this seems more appropriate:

Suggested change
<p>The production <emu-grammar>LineTerminatorSequence :: &lt;CR&gt; &lt;LF&gt;</emu-grammar> matches a sequence of code points that should collectively operate as a single line terminator, such as when reporting line numbers in diagnostics.</p>
<p>Line numbers reported in diagnostics should be counted in terms of LineTerminatorSequences, not individual LineTerminators.</p>

(I'm sure there's a nicer way to word this but you get the idea)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I still prefer my wording. If I could, I would rename LineTerminatorSequence to LineTerminator and rename LineTerminator to something like LineTerminatorComponent. But these are their names, they're pretty well known, and I think it'd be too disruptive to do that. I think we just have to allow ourselves to keep the concepts of LineTerminator and "line terminator" separate in our heads.

@michaelficarra michaelficarra requested a review from a team April 9, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants