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

Mark invalid values for \p{...} with flag u as errors #7

Open
slevithan opened this issue May 18, 2024 · 1 comment
Open

Mark invalid values for \p{...} with flag u as errors #7

slevithan opened this issue May 18, 2024 · 1 comment

Comments

@slevithan
Copy link
Owner

When using flag u, Regex Colorizer (as of v1.0.0) uses a simplistic regex to identify Unicode properties with \p{...} and \P{...}. It would be better to flag any values that are not actually supported by ECMAScript.

@mathiasbynens has a bunch of great, related libraries. See:

Not yet sure which of these are the most relevant.

@mathiasbynens
Copy link

regexpu-core uses unicode-match-property-ecmascript and unicode-match-property-value-ecmascript. I think you'll want the same packages. Note that they deal with character properties only, not properties of strings.

The v flag also adds support for the following properties of strings:

Basic_Emoji
Emoji_Keycap_Sequence
RGI_Emoji_Modifier_Sequence
RGI_Emoji_Flag_Sequence
RGI_Emoji_Tag_Sequence
RGI_Emoji_ZWJ_Sequence
RGI_Emoji

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