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

Fix template string lexing in JavaScript lexer #1623

Merged

Conversation

pyrmont
Copy link
Contributor

@pyrmont pyrmont commented Nov 9, 2020

The changes made in #1548 to avoid empty regular expression patterns, broke the template string rules in the JavaScript lexer (and lexers such as the TypeScript lexer that inherit from it). This PR adds the rules necessary to fix this lexing.

It fixes #1616.

@pyrmont pyrmont self-assigned this Nov 9, 2020
@pyrmont pyrmont added the needs-review The PR needs to be reviewed label Nov 9, 2020
@pyrmont
Copy link
Contributor Author

pyrmont commented Nov 9, 2020

@vishalsatam Thanks for reporting the bug. This was a regression that mistakenly crept in as a result of some maintenance we did in the last release. This PR should fix it :)

@pyrmont pyrmont merged commit f10994d into rouge-ruby:master Nov 10, 2020
@pyrmont pyrmont removed the needs-review The PR needs to be reviewed label Nov 10, 2020
@pyrmont pyrmont deleted the bugfix.javascript-template-strings branch November 10, 2020 01:24
@pyrmont
Copy link
Contributor Author

pyrmont commented Nov 10, 2020

@vishalsatam This has been merged into master and will be part of v3.25.0. That's schedule for release later today (or tomorrow depending on your time zone)!

@vishalsatam
Copy link

vishalsatam commented Nov 10, 2020

@pyrmont Thank you so much and I appreciate the quick turnaround time.

mattt pushed a commit to NSHipster/rouge that referenced this pull request May 19, 2021
The changes made in rouge-ruby#1548 to avoid empty regular expression patterns,
broke the template string rules in the JavaScript lexer (and lexers
such as the TypeScript lexer that inherit from it). This commit adds the
rules necessary to fix this lexing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Closing backticks in Typscript not being understood by the lexer.
2 participants