bpruitt-goddard / vscode-mermaid-syntax-highlight

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

Update graph keyword regex #151

Open kib opened 2 weeks ago

kib commented 2 weeks ago

Supports flowchart-elk and makes the naming or direction of a graph optional

closes #149 and #150

bpruitt-goddard commented 6 days ago

Thanks for the contribution! Just a few comments:

  1. I think the capture group around (-elk) is messing with the other captures. I think it needs to be something like a non-capture group ((?:-elk)). This is interferring with the capture group highlighting, resulting in the -elk getting highlighted instead of the direction: image
  2. The * after the -elk is allowing it to match multiple results, which means this (incorrectly) highlights: image
  3. While in there anyway, do you think the direction should be clarified to match the existing subgraph regex here? Since currently it allows any string to match rather than the proper directions: image