bpruitt-goddard / vscode-mermaid-syntax-highlight

Markdown syntax support for the Mermaid charting language
MIT License
92 stars 35 forks source link

syntax: add box keyword for sequenceDiagram #122

Closed tomholford closed 10 months ago

tomholford commented 10 months ago

This adds a new rule + test coverage for capturing the box keyword as described in the docs here:

https://mermaid.js.org/syntax/sequenceDiagram.html#grouping-box

Resolves this scenario:

image
bpruitt-goddard commented 10 months ago

Looks good, thanks!

At first glance, I was going to suggest that the non-transparent colors get highlighted similar to transparent, but I'm not seeing any clear guidance on what those possible options could be, and it would be much trickier syntax than simply treating it as part of the string (especially given that it also has an example for rgb). I think this solution strikes a good balance.