-
Notifications
You must be signed in to change notification settings - Fork 14
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
$ in template literals #57
Comments
So far RegPack performs renaming inside strings, however I am still not convinced that it should be done that way, the only reason for it is if the string is run through RegPack v5.0 will identify strings within the code (for #55). This issue can easily be solved by checking for |
I went for the following strategy : the replacement is performed :
Every other occurrence (in a string) is not replaced. I assumed that |
…on for #57 (no replacement in strings)
Currently renaming routine incorrectly treats
$
in template literals as a variable. As a result, it is renamed.There's an example: after passing
alert(`${i}`)
into RegPack, the resulting string becomesalert(`a{e}`)
.That's not a big issue as the
$
may be manually excluded, but this behavior can be surprising.The text was updated successfully, but these errors were encountered: