Syntax highlighting doesn't work with nested block comments.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 359
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
Consider the following code:
/* This is a multi-line comment and it can span
* as many lines as you like
/*
This is a nested comment
*/
// Another nested comment
The comment continues here.
*/
fun main() {
println("Hello, World!")
}
The closing of the nested comment seems to end the outer comment.
Where it can be really confusing is if you include a /* in a comment as you may not realise that you are still in a comment.
Eg in the following code, the main function is commented out:
/*
* This function will work on the directory /home/user/*
*/
fun main() {
println("Hello, World!")
}
But it looks completely valid with this extension:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Kotlin syntax-highlighting grammar used by the VSCode extension and reproduce the two examples in a local VSCode window. Update the grammar so nested block comments and comment text containing /* remain highlighted correctly, then verify both examples no longer make code appear active inside a comment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100