regex-colorizer
regex-colorizer copied to clipboard
Mark invalid values for \p{...} with flag u as errors
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:
- unicode-match-property-ecmascript
- unicode-match-property-value-ecmascript
- unicode-property-aliases-ecmascript
- unicode-property-value-aliases-ecmascript
- unicode-canonical-property-names-ecmascript
- etc.
Not yet sure which of these are the most relevant.
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