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 & selector in Sass/SCSS lexer #1554

Merged
merged 3 commits into from
Jun 29, 2020

Conversation

pyrmont
Copy link
Contributor

@pyrmont pyrmont commented Jun 19, 2020

The & selector does not match correctly if it is combined with certain characters. This PR fixes the problem by adding a rule matching & to :content_common.

It fixes #841.

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

pyrmont commented Jun 19, 2020

@AlexWayfer I wouldn't blame you if you've moved on but just wanted to let you know that this appears to fix the bug you identified in Rouge's handling of & in Sass/SCSS selectors.

@AlexWayfer
Copy link

@AlexWayfer I wouldn't blame you if you've moved on but just wanted to let you know that this appears to fix the bug you identified in Rouge's handling of & in Sass/SCSS selectors.

OK, thank you, no problem. I'm disappointed that there is still no notifications about related PRs at least in the same repository.

Again, thank you. I still use SCSS sometimes and Rouge, especially on GitLab.

@pyrmont pyrmont merged commit 32fedc9 into rouge-ruby:master Jun 29, 2020
@pyrmont
Copy link
Contributor Author

pyrmont commented Jun 29, 2020

@AlexWayfer Yeah, that is strange that GitHub doesn't automatically notify you if a PR is marked as resolving an issue. Glad I tagged you.

I've merged this in and it will be part of v3.21.0 of Rouge when that comes out on Tuesday 14 July. I'm not sure of when GitLab will update the version of Rouge they're running but they're usually pretty quick. Sorry again for the wait!

@pyrmont pyrmont removed the needs-review The PR needs to be reviewed label Jun 29, 2020
@AlexWayfer
Copy link

Sorry again for the wait!

No problem, thank you for fix and merge!

@pyrmont pyrmont deleted the bugfix.sass-selectors branch June 30, 2020 06:03
mattt pushed a commit to NSHipster/rouge that referenced this pull request May 19, 2021
The `&` selector does not match correctly if it is combined with certain
characters. This commit fixes the problem by adding a rule matching `&`
to the `:content_common` state.
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.

SCSS and Sass give errors with :: (pseudo-element) in selector
2 participants