You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following ES6, make the token that blocks invalid metasequences (here) even stricter by also making it an error to escape punctuation, etc. in cases where the escaped character is not special on its own. In ES6 with flag u, the only characters interpreted as themselves when escaped are ^ $ \ . * ? ( ) [ ] { } | (and presumably a hyphen in character classes).
Need to ensure this accounts for characters that are special only with certain XRegExp flags, e.g. escaping whitespace with flag x. This is probably handled automatically by XRegExp applying tokens in reverse insertion order.
While at it, should probably also disallow \b within character classes since \b for the backspace control character is a super minor convenience and creates confusion given the difference in meaning of \b outside character classes.
The text was updated successfully, but these errors were encountered:
Following ES6, make the token that blocks invalid metasequences (here) even stricter by also making it an error to escape punctuation, etc. in cases where the escaped character is not special on its own. In ES6 with flag
u
, the only characters interpreted as themselves when escaped are^ $ \ . * ? ( ) [ ] { } |
(and presumably a hyphen in character classes).Need to ensure this accounts for characters that are special only with certain XRegExp flags, e.g. escaping whitespace with flag
x
. This is probably handled automatically by XRegExp applying tokens in reverse insertion order.While at it, should probably also disallow
\b
within character classes since\b
for the backspace control character is a super minor convenience and creates confusion given the difference in meaning of\b
outside character classes.The text was updated successfully, but these errors were encountered: