Closed Bug 1281739 Opened 4 years ago Closed 4 years ago

Match updated spec for `/\w/iu` and `/\W/iu`

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: mathias, Assigned: arai)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

Now that https://github.com/tc39/ecma262/pull/525 has landed, `\u017F` (LATIN SMALL LETTER LONG S) and `\u212A` (KELVIN SIGN) are word characters for `/iu` patterns.

Expected behavior:

    /\w/iu.test('\u017F') // true
    /\w/iu.test('\u212A') // true
    /\W/iu.test('\u017F') // false
    /\W/iu.test('\u212A') // false

Actual behavior: currently, they all result in `true`.
Removed K, S, k, s, KELVIN SIGN, LATIN SMALL LETTER LONG S from kNegatedIgnoreCaseWordAndSurrogateRanges.
Assignee: nobody → arai.unmht
Attachment #8764761 - Flags: review?(till)
Comment on attachment 8764761 [details] [diff] [review]
Do not match K, S, k, s, KELVIN SIGN, LATIN SMALL LETTER LONG S with \W in unicode RegExp.

Review of attachment 8764761 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, thank you.
Attachment #8764761 - Flags: review?(till) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/71d499e82b2cd5096b6f92f0c565cb6cfd5c6039
Bug 1281739 - Do not match K, S, k, s, KELVIN SIGN, LATIN SMALL LETTER LONG S with \W in unicode ignoreCase RegExp. r=till
This is a breaking change.
will update documentation after merge.
Keywords: dev-doc-needed
https://hg.mozilla.org/mozilla-central/rev/71d499e82b2c
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
I'm not going to write a site compatibility doc for this because the u flag is still new and the change is minor.
You need to log in before you can comment on or make changes to this bug.