Open YuriGor opened 5 years ago
Confirmed. Just ran into this myself. Quite annoying. 😕
Thought first it was related to the ` being a string literal thing in javascript, which it probably is, but semi-colons seem to somehow mess with it too:
Interesting because this is the opposite problem that other markdown syntax highlighters have, where any "invalid" syntax (e.g. NOT ending a line with a semicolon) will break highlighting for the rest of the markdown.
I doubly ran into this issue because I use JsPrettier to auto-format my files on save, and it was adding a semicolon to the end of my JS blocks. 😂
If anyone else is having that issue, you can tell JsPrettier to ignore markdown files, but you can also add <!-- prettier-ignore -->
right above the code block, which is what I opted for until this bug can be fixed.
Anonymous code blocks works fine, but code blocks with syntax
js
orjavascript
make following text after code scoped as a string.here is a text sample: https://gist.github.com/YuriGor/acb356c1803b0ea75ebeb865d48f28ef