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: q lexer - escaped quote within strings not being recognised #1355

Merged
merged 3 commits into from Nov 10, 2019

Conversation

AngusWilson
Copy link
Contributor

The current lexer would recognise the escaped quote within "\"" as the end of the string

This caused files with any escaped quotes to be treated as a string from there onward and have no further syntax highlighting.

New rule on line 113 ahead of the pop checks that the quote is not escaped before terminating the string.

See updated example below.

Old:
image

New:
image

@pyrmont pyrmont self-assigned this Nov 5, 2019
@pyrmont pyrmont added the needs-review The PR needs to be reviewed label Nov 5, 2019
@pyrmont pyrmont merged commit 984aae8 into rouge-ruby:master Nov 10, 2019
@pyrmont
Copy link
Contributor

pyrmont commented Nov 10, 2019

Thanks for the fix, @AngusWilson! The next release of Rouge will come out on Tuesday and this will be part of that release 🎉

@pyrmont pyrmont removed the needs-review The PR needs to be reviewed label Nov 10, 2019
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.

None yet

3 participants