bpruitt-goddard / vscode-mermaid-syntax-highlight

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

Separate chart highlighting #6

Closed bpruitt-goddard closed 5 years ago

bpruitt-goddard commented 5 years ago

The previous approach had all of the syntax highlighting happen across the markdown block. Instead split the highlighting into the 3 chart types to avoid conflicts or bleed-through. This PR moves all of the existing code under the graph keyword and will match to the end of the markdown block. Mermaid only allows one chart per markdown section, so this is appropriate.

The new functionality will only highlight for the graph chart once it detects the keyword.