Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

allow escape for more characters in u not just v? #27

Closed
markusicu opened this issue May 26, 2021 · 4 comments
Closed

allow escape for more characters in u not just v? #27

markusicu opened this issue May 26, 2021 · 4 comments

Comments

@markusicu
Copy link
Collaborator

markusicu commented May 26, 2021

In the TC39 meeting today (2021-may-26) @waldemarhorwat commented on our proposed new character class syntax allowing identity escapes of more symbol/punctuation characters than the existing syntax, and asked whether the existing Unicode/u syntax should be extended to allow identity escapes for the same larger set.

In the current version of the proposed spec changes, the additional characters allowed in identity escapes inside character classes are

ClassHalfOfDouble :: one of & - ! # % , : ; < = > @ _ ` ~

Seems like a good idea. Anyone opposed?

Also, in the existing Unicode mode, a dash can be escaped inside a character class but not outside. Might want to allow that everywhere.

Should these simply be added to CharacterEscape via IdentityEscape, allowing them even outside of character classes?

Should this be done as part of the spec changes for this proposal, or separately?

@mathiasbynens
Copy link
Member

I like it!

Should this be done as part of the spec changes for this proposal, or separately?

IMHO it should be done separately, so that this proposal does not affect u semantics at all.

@mathiasbynens
Copy link
Member

@markusicu
Copy link
Collaborator Author

We just removed the _ from the set of characters to escape. See issue #60.

To clarify: This is an independent change for /u except for the desire to synchronize the set of characters that can be escaped.

@mathiasbynens
Copy link
Member

This is still worth pursuing, but as discussed, is not part of this proposal.

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

No branches or pull requests

2 participants