-
Notifications
You must be signed in to change notification settings - Fork 460
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
base: main
Are you sure you want to change the base?
Increase coverage of String.prototype.replace $xy replacement patterns #3931
Conversation
* $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
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. |
Ref tc39/ecma262#1426
Ref tc39/ecma262#3157