-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editorial: Mention the special status of U+0085 NEXT LINE #3303
Conversation
It is the only character that has property "White_Space" but is not matched by either |WhiteSpace| or |LineTerminator|.
@@ -16371,7 +16371,7 @@ <h1>White Space</h1> | |||
<p>U+0020 (SPACE) and U+00A0 (NO-BREAK SPACE) code points are part of <USP>.</p> | |||
</emu-note> | |||
<emu-note> | |||
<p>Other than for the code points listed in <emu-xref href="#table-white-space-code-points"></emu-xref>, ECMAScript |WhiteSpace| intentionally excludes all code points that have the Unicode “White_Space” property but which are not classified in general category “Space_Separator” (“Zs”).</p> | |||
<p>Other than the code points listed in <emu-xref href="#table-white-space-code-points"></emu-xref>, ECMAScript |WhiteSpace| intentionally excludes all code points that have the Unicode “White_Space” property but which are not classified in general category “Space_Separator” (“Zs”). As of Unicode 15.1.0, the only such code point that is not a <emu-xref href="#sec-line-terminators">line terminator</emu-xref> is U+0085 (NEXT LINE).</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The editor group wasn't happy with this change as-is. If we really wanted to add something for the readers who might be already familiar with Unicode's White_Space
property who may be confused, we can say something like
<p>Other than the code points listed in <emu-xref href="#table-white-space-code-points"></emu-xref>, ECMAScript |WhiteSpace| intentionally excludes all code points that have the Unicode “White_Space” property but which are not classified in general category “Space_Separator” (“Zs”). As of Unicode 15.1.0, the only such code point that is not a <emu-xref href="#sec-line-terminators">line terminator</emu-xref> is U+0085 (NEXT LINE).</p> | |
<p>Other than the code points listed in <emu-xref href="#table-white-space-code-points"></emu-xref>, ECMAScript |WhiteSpace| intentionally excludes all code points that have the Unicode “White_Space” property but which are not classified in general category “Space_Separator” (“Zs”), such as all <emu-xref href="#table-line-terminator-code-points">line terminators</emu-xref>, U+0085 (NEXT LINE), and possibly others.</p> |
But that's also probably not a significant population of readers, so it's also okay to not add anything here. Closing for now.
The link is good, but I still think an explicit mention of U+0085 (NEXT LINE) and probably also U+FEFF (ZERO WIDTH NO-BREAK SPACE) would be better. As observed in tc39/proposal-regexp-v-flag#37, the classification of these two code points is easy to overlook, and IMO it behooves the spec to highlight that. |
It is the only character that has property "White_Space" but is not matched by either |WhiteSpace| or |LineTerminator|, which leads to issues such as tc39/proposal-regexp-v-flag#37 .
Similarly, we might also consider documenting the special status of U+FEFF ZERO WIDTH NO-BREAK SPACE as the only character matched by |WhiteSpace| that does not have property "White_Space".