Skip to content
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

Escape ${ in template string #1514

Merged
merged 2 commits into from
Jun 5, 2024
Merged

Conversation

msujew
Copy link
Member

@msujew msujew commented May 27, 2024

Closes #1513

Whenever ${ was included in a keyword, the generated template literal expected an expression, resulting in a parser error. This change escapes the ${ as expected.

@msujew msujew added the cli CLI related issue label May 27, 2024
Copy link
Contributor

@Lotes Lotes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes, but I still need some explanation. I read the original problem. But how does minifying (mode=production) avoids this problem?

@msujew msujew merged commit ea58201 into main Jun 5, 2024
5 checks passed
@msujew msujew deleted the msujew/escape-template-string-start branch June 5, 2024 11:46
@msujew msujew added this to the v3.1.0 milestone Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli CLI related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Got "unterminated string literal" in generated grammar.ts error when grammar contains "${"
3 participants