monaqa / tree-sitter-mermaid

Mermaid.js grammar for tree-sitter
MIT License
31 stars 6 forks source link

fix: directives #12

Closed trongthanh closed 6 months ago

trongthanh commented 6 months ago

My attempt to fix current directive parser which is broken. While the current parser recognizes "some" directives, it always assume the diagram definition to be Class diagram. Besides, directives are common with mermaid diagram in markdown code fence and currently they often make the main diagram syntax a total mess.

Here are few notes while I looked into this: