-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
SyntaxError: Invalid regular expression #20
Comments
I think the most reliable solution is to use AST (babel for instance) to find and replace strings instead of manually building regexp - it's hardly possible to take into account all possible variants there |
But I guess I found my solution with |
Hi, @JPeer264! |
Hey, |
I'm still on
Seems like rcs-core transforms that code
|
I actually wonder where this comes from: Uncaught SyntaxError: Invalid regular expression: /^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/: Range out of order in character class Because in The second issue, with the double escape, seems like it comes from recast. I will check if this behavior is wanted or a bug. |
Alright, I got it. This seems like a bug in |
@klimashkin I will try to update |
@klimashkin please try it again with |
Seems like it works now both on minified and not minified .js files. 🎉 |
If install escodegen manually and import
const processJs = require('rename-css-selectors/lib/processJs/processJs')
I got errorThe text was updated successfully, but these errors were encountered: