Skip to content
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: Rename aliases in Canonicalize for better readability #3412

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -37175,12 +37175,11 @@
1. If _rer_.[[IgnoreCase]] is *false*, return _ch_.
1. Assert: _ch_ is a UTF-16 code unit.
1. Let _cp_ be the code point whose numeric value is the numeric value of _ch_.
1. Let _u_ be toUppercase(« _cp_ »), according to the Unicode Default Case Conversion algorithm.
1. Let _uStr_ be CodePointsToString(_u_).
1. If the length of _uStr_ ≠ 1, return _ch_.
1. Let _cu_ be _uStr_'s single code unit element.
1. If the numeric value of _ch_ ≥ 128 and the numeric value of _cu_ < 128, return _ch_.
1. Return _cu_.
1. Let _mapped_ be toUppercase(« _cp_ »), according to the Unicode Default Case Conversion algorithm.
1. If the number of elements in _mapped_ ≠ 1 or the length of CodePointsToString(_mapped_) ≠ 1, return _ch_.
michaelficarra marked this conversation as resolved.
Show resolved Hide resolved
1. Let _mappedCP_ be the single code point element of _mapped_.

Check warning on line 37180 in spec.html

View workflow job for this annotation

GitHub Actions / check for newly-introduced spelling errors

Potential Typo

"mappedCP" is not a previously used word or composed of previously used words. Perhaps it is a typo?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This step could be followed by an assertion, but I have a slight preference for omitting it.

Suggested change
1. Let _mappedCP_ be the single code point element of _mapped_.
1. Let _mappedCP_ be the single code point element of _mapped_.
1. Assert: _mappedCP_ ≤ 0xFFFF.

Copy link
Member

Choose a reason for hiding this comment

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

Same, I don't think it's helpful.

1. If the numeric value of _ch_ ≥ 128 and _mappedCP_ < 128, return _ch_.

Check warning on line 37181 in spec.html

View workflow job for this annotation

GitHub Actions / check for newly-introduced spelling errors

Potential Typo

"mappedCP" is not a previously used word or composed of previously used words. Perhaps it is a typo?
1. Return the code unit whose numeric value is _mappedCP_.

Check warning on line 37182 in spec.html

View workflow job for this annotation

GitHub Actions / check for newly-introduced spelling errors

Potential Typo

"mappedCP" is not a previously used word or composed of previously used words. Perhaps it is a typo?
</emu-alg>
<emu-note>
<p>In case-insignificant matches when HasEitherUnicodeFlag(_rer_) is *true*, all characters are implicitly case-folded using the simple mapping provided by the Unicode Standard immediately before they are compared. The simple mapping always maps to a single code point, so it does not map, for example, `ß` (U+00DF LATIN SMALL LETTER SHARP S) to `ss` or `SS`. It may however map code points outside the Basic Latin block to code points within it—for example, `ſ` (U+017F LATIN SMALL LETTER LONG S) case-folds to `s` (U+0073 LATIN SMALL LETTER S) and `K` (U+212A KELVIN SIGN) case-folds to `k` (U+006B LATIN SMALL LETTER K). Strings containing those code points are matched by regular expressions such as `/[a-z]/ui`.</p>
Expand Down
Loading