bpruitt-goddard / vscode-mermaid-syntax-highlight

Markdown syntax support for the Mermaid charting language
MIT License
98 stars 37 forks source link

Fix Mermaid Language And Markdown Highlighting #37

Closed bpruitt-goddard closed 2 years ago

bpruitt-goddard commented 3 years ago

There is an issue with the way the mermaid language file support was added. Markdown files are processing/highlighting any mermaid lines in fenced blocks as mermaid instead of mermaid-defined fenced code blocks.

Reproduce:

<!-- This should not highlight -->

graph LR A --> B


<!-- But this should still highlight -->
```mermaid
graph LR
  A --> B


This appears to be an issue with the fact that `mermaid` was added as an include at the top of the language file in the `patterns` section. It was added for mermaid files, but means that the markdown begin/end block checking is being skipped for markdown code blocks.
bpruitt-goddard commented 2 years ago

This has since been fixed:

Image 2022-06-13 at 12 20 23