standardnotes / listed

Create an online publication with automatic email newsletters. https://listed.to
108 stars 26 forks source link

Rust code block comment syntax is not highlited properly #290

Open dewcked opened 1 year ago

dewcked commented 1 year ago

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.