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

Support RegExp set notation + properties of strings proposal #51

Closed
9 tasks done
mathiasbynens opened this issue Aug 17, 2021 · 4 comments
Closed
9 tasks done

Support RegExp set notation + properties of strings proposal #51

mathiasbynens opened this issue Aug 17, 2021 · 4 comments

Comments

@mathiasbynens
Copy link
Owner

mathiasbynens commented Aug 17, 2021

Let’s use this as the tracking bug for this work.

Here’s the high-level steps towards RegExp set notation + properties of strings support in regexpu-core:

@nicolo-ribaudo
Copy link
Collaborator

nicolo-ribaudo commented Aug 17, 2021

regjsgen PR: bnjmnt4n/regjsgen#20

@nicolo-ribaudo
Copy link
Collaborator

Currently regexpu-core never introduces new flag in the output regexp. However, when transpiling things like /[^[a-z][f-h]]/v, it would be good to transform it to /[^a-z]/u and not to /(?:(?![a-z])[\s\S])/ (unless unicodeFlag is set to "transform").

Do you think that it would be ok to document that v always compiles regexps to u, unless the regexpu-core user specifies that u needs to be transformed? Or do we need to add a way for regexpu-core to signal the flags for the resulting pattern?

@mathiasbynens
Copy link
Owner Author

Transpiling to u seems fine, now that modern environments all support the u flag (and have done so for a while). 👍

@mathiasbynens
Copy link
Owner Author

This is shipping in Babel v7.17.0! https://babeljs.io/blog/2022/02/02/7.17.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants