-
Notifications
You must be signed in to change notification settings - Fork 462
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
Increase coverage of String.prototype.replace $xy replacement patterns #3931
Increase coverage of String.prototype.replace $xy replacement patterns #3931
Conversation
a8a5d2d
to
3e3e39c
Compare
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.
Confirmed these tests pass my ES2024 GetSubstitution implementation in es-abstract
, and fail on <= ES2023 (as expected)
update; tc39/ecma262#3157 (comment) should get some coverage too ( |
@ljharb coverage expanded |
This normative change got consensus conditionally in the 2023-09 TC39 plenary meeting. "If there is a mismatch between engines, the presenter should bring the change back to TC39 to discuss next steps." So I guess before we land this, the proponents of the normative change should perform that investigation. |
Done. The only implementation with failures is engine262, which does not implement the single-digit fallback:
$ eshost -se '"foo-x-bar".replace(/(x)/, "|$10|")'
#### ChakraCore, GraalJS, Hermes, JavaScriptCore, Moddable XS, QuickJS, SpiderMonkey, V8
foo-|x0|-bar
#### engine262
foo-|$10|-bar |
Thanks. So does that mean there are no longer any blockers for this? |
Yes, that is my understanding. |
94d5c55
to
1bf3354
Compare
What's the status of this? It looks like it has a positive review from Jordan, but still needs to be autosquashed. |
It's easy to squash it at landing time, but I wanted more reviews before landing it. |
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.
LGTM, also passes with my literal implementation of GetSubstitution
.
* $xy is a valid capture index * $xy is not a valid capture index but $x is * neither $xy nor $x is a valid capture index
…tch capture index
1bf3354
to
e1a7d43
Compare
Ref tc39/ecma262#1426
Ref tc39/ecma262#3157