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
/(s)\1/ui is currently transformed to /([s\u017F])\x01/i.
Back references should probably not be transformed to hexadecimal escapes
Canonicalizing the back reference's content is tricky, I'm not sure how this feature can be supported without canonicalizing the input string first, e.g. in /(s)\1/ui.test("s\u017f") == true.
The text was updated successfully, but these errors were encountered:
(1) is a bug in regjsparser, which regexpu depends on. I’ve reported it and and will try to get it fixed as soon as possible.
As for (2), I’d rather not transpile strings too (especially since it could only ever work reliably for literals). I’ve managed to avoid this for /iu regular expressions without back-references. I’m afraid you’re right that it cannot be done in these cases, though. :(
Once (1) is resolved, I’ll add a note to the README saying regexpu doesn’t support canonicalizing the contents of back-references in regular expressions with both the i and u flag set, since that would require transpiling/wrapping strings.
/(s)\1/ui
is currently transformed to/([s\u017F])\x01/i
./(s)\1/ui.test("s\u017f") == true
.The text was updated successfully, but these errors were encountered: