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

Add WSpace as a valid Unicode property alias for White_Space #3286

Open
lgalfaso opened this issue Feb 20, 2024 · 4 comments
Open

Add WSpace as a valid Unicode property alias for White_Space #3286

lgalfaso opened this issue Feb 20, 2024 · 4 comments
Assignees

Comments

@lgalfaso
Copy link

Description: Add WSpace as a valid Unicode property alias for White_Space
The table of Binary Unicode property aliases defines the aliases for all Unicode properties. In all cases but one, the definition allows the use of the Unicode property long name, and the corresponding Unicode property short name as a valid alias. There is one exception to this with the Unicode property White_Space that defines the alias space.

Unicode property aliases defines the aliases for the property White_Space with the property short name WSpace, and the "Other alias" of space.

To be consistent with the other properties, the short property name WSpace should be added as a valid alias to the property White_Space. The Unicode property alias space should be preserved.

v8 and jsc already support WSpace as a valid property alias for White_Space.

@Lessme12

This comment was marked as spam.

@michaelficarra
Copy link
Member

@lgalfaso What is the motivation for this other than purity/consistency? I would rather read /\p{space}/v than /\p{WSpace}/v.

@lgalfaso
Copy link
Author

@michaelficarra the reason for this is about expected compatibility. Engines that use some third party library that understands the alias WSpace (eg: v8, jsc) work different than engines than the ones that follow this part of the standard to the letter (eg: QuickJS).

If people rather write /\p{White_Space}/v, /\p{space}/v, or /\p{WSpace}/v, this is something that I do not have an opinion and would let them have this the way that it works best for them.

@mathiasbynens
Copy link
Member

OP is right; we somehow forgot to include the WSpace alias.

I too prefer not using aliases but ECMAScript does support them, and this is the only known case where we officially support the property but not all its aliases.

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

4 participants