ascii_only
changes semantics of redundantly escaped regexes
#1506
Labels
ascii_only
changes semantics of redundantly escaped regexes
#1506
Steps to repro:
When it occurs inside a regex literal,
\❗
is equivalent to just❗
- the redundant escape is ignored by JS runtimes (as far as I can tell?).But, once the emoji has been replaced with a unicode escape sequence (by terser), the
\\
substring parses as an escaped backslash, changing the meaning of the regex.Maybe there needs to be an initial pass to strip redundant backslashes?
(By the way, when
\❗
occurs inside a string literal, it appears to be handled correctly)The text was updated successfully, but these errors were encountered: