Skip to content

Rust code block comment syntax is not highlited properly #290

@dewcked

Description

@dewcked

Following block comment:

```rust
     /*
     * This is another type of comment, a block comment. In general,
     * line comments are the recommended comment style. But block comments
     * are extremely useful for temporarily disabling chunks of code.
     * /* Block comments can be /* nested, */ */ so it takes only a few
     * keystrokes to comment out everything in this main() function.
     * /*/*/* Try it yourself! */*/*/
     */
```

is being escaped after the first comment ending delimiter */, opened again at the fourth comment starting delimiter /*, and then closed again, opened again, closed again with broken highlight.

Rust allows nested block comment, so the comment above must be greyed out at all (If delimiter pairs match).

See official doc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions