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

Indented comments don't have correct syntax highlighting #250

Open
1 task
wkillerud opened this issue Oct 2, 2024 · 1 comment
Open
1 task

Indented comments don't have correct syntax highlighting #250

wkillerud opened this issue Oct 2, 2024 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@wkillerud
Copy link
Owner

wkillerud commented Oct 2, 2024

In which editor is this a problem?

Visual Studio Code

Describe the bug

For Sass indented, indented-style comments don't get the correct syntax highlighting.

What's the expected result?

Indented comments should work the same as non-indented.

Link to minimal reproducible example

https://gist.github.com/wkillerud/1bf8ebb0d1c9db10bf4c7bca45805f13

Participation

  • I am willing to submit a pull request for this issue.
@wkillerud wkillerud added bug Something isn't working help wanted Extra attention is needed labels Oct 2, 2024
@wkillerud
Copy link
Owner Author

The syntax highlighting is based on the TextMate grammar in vscode-extension/languages/. These lines to be specific:

"comment_block": {
"begin": "/\\*",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.sass"
}
},
"end": "\\*/",
"endCaptures": {
"0": {
"name": "punctuation.definition.comment.sass"
}
},
"name": "comment.block.sass"
},
"comment_line": {
"begin": "//",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.sass"
}
},
"end": "\\n",
"name": "comment.line.sass"
},

The problem is to figure out how to end the comment block.

I did an experiment with semantic tokens to perhaps fix this issue outside of the TextMate grammar, but it didn't seem to have any visual effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant