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 tokenization of compact Ruby class names #1470

Merged
merged 1 commit into from Mar 31, 2020

Conversation

ashmaroli
Copy link
Contributor

Resolves #1469

(Note: I felt highlighting the entire name reference as Name.Class token would look better instead of highlighting just the class name proper.)

Before

ruby Visual Test-before

After

ruby Visual Test-after

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

@pyrmont pyrmont left a comment

Choose a reason for hiding this comment

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

@ashmaroli I was going to say that I didn't think that it was correct to refer to A::B as the class name but that is the result you get when you call #name on a class defined with either syntax so looks good to me.

@ashmaroli
Copy link
Contributor Author

Thanks for reviewing @pyrmont

@pyrmont pyrmont merged commit 826c6d4 into rouge-ruby:master Mar 31, 2020
@pyrmont pyrmont removed the needs-review The PR needs to be reviewed label Mar 31, 2020
mattt pushed a commit to NSHipster/rouge that referenced this pull request May 21, 2020
The Ruby lexer currently tokenises compact class names differently to
how they are tokenised if nested. This commit makes both results
consistent.
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.

Incorrect tokenization of compact Ruby class names
2 participants