-
Notifications
You must be signed in to change notification settings - Fork 36
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
escaped $
and {
characters are not handled correctly
#45
Comments
🤔 maybe this is me not understanding template literal strings well, but I don't follow why that should be the case. The |
Because otherwise you can't dedent strings with
The Technically the best form would be detecting that it's
|
My workaround be like:
It is ugly |
These characters are special in template string literals, so it should be assumed if they're escaped it's to avoid them being interpolated. If it desired to have the escaping slash for these characters, then an escaped slash can be used. Without this it's not possible to dedent strings that reassemble template string literal interpolations without a follow-up transformation (i.e. calling `.replace` or similar). Resolves #45 --------- Co-authored-by: Josh Goldberg <git@joshuakgoldberg.com>
Follow on from #2 - currently
dedent
does not treat$
or{
as special when determining what it should do with escaped characters:The text was updated successfully, but these errors were encountered: