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

Revert empty patterns in Ruby lexer #1624

Merged
merged 2 commits into from
Nov 10, 2020

Conversation

pyrmont
Copy link
Contributor

@pyrmont pyrmont commented Nov 9, 2020

The maintenance changes in #1548 resulted in updates to two rules in the Ruby lexer, one regarding regular expression flags and the other regarding heredoc strings. However, these patterns should not have been changed. The change in #1548 was to prevent rules that matched an empty string unless they contained a 'predicate' of some sort. Both rules in the Ruby lexer contained such a predicate and so should not have been changed. This PR fixes that error.

This fixes #1618.

@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

@stomar Thanks for reporting the error. This was a mistake on our part connected with some broader maintenance on the project. The changes have been reverted 🎉

@pyrmont pyrmont merged commit ba8096c into rouge-ruby:master Nov 10, 2020
@pyrmont pyrmont deleted the bugfix.ruby-empty-patterns branch November 10, 2020 01:21
@pyrmont pyrmont removed the needs-review The PR needs to be reviewed label Nov 10, 2020
@pyrmont
Copy link
Contributor Author

pyrmont commented Nov 10, 2020

@stomar This has been merged in and will be part of v3.25.0. That's scheduled for release later today (or tomorrow depending on your time zone). Thanks again!

@stomar
Copy link

stomar commented Nov 19, 2020

Great, thanks!

stomar added a commit to stomar/www.ruby-lang.org that referenced this pull request Dec 21, 2020
Remove restriction to rouge < 3.24.0 and update rouge.

The bug in rouge 3.24.0 concerning syntax highlighting of
regular expressions has been fixed in version 3.25.0, see

* rouge-ruby/rouge#1618
* rouge-ruby/rouge#1624
mattt pushed a commit to NSHipster/rouge that referenced this pull request May 19, 2021
The maintenance changes in rouge-ruby#1548 resulted in updates to two rules in
the Ruby lexer, one regarding regular expression flags and the other
regarding heredoc strings. However, these patterns should not have been
changed. The change in rouge-ruby#1548 was to prevent rules that matched an empty
string unless they contained a 'predicate' of some sort. Both rules in
the Ruby lexer contained such a predicate and so should not have been
changed. This commit fixes that error.
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.

Ruby lexer bug for regular expressions (since 3.24.0)
3 participants