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
Newlines in evaluated RegExp literals are not escaped #3434
Comments
Very peculiar indeed - and since it's consistent across all Node.js versions (0.10 and above), I guess we'll need to work around this. |
I actually wrote a fix for this for Terser. This is the main function. Anyone feel free to make a PR/commit with the function in it. |
alexlamsl
added a commit
to alexlamsl/UglifyJS
that referenced
this issue
Oct 6, 2019
Thanks for the heads up - I've borrowed your test case in #3453 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
When compression code of the form
RegExp("any string literal")
, new lines are not escaped resulting is syntactically incorrect code.Version
uglify-js 3.6.0
Complete
minify()
optionsuglify-js
inputuglify-js
outputExpected result
Note: This is the same bug as this one.
The text was updated successfully, but these errors were encountered: