bpruitt-goddard / vscode-mermaid-syntax-highlight

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

Broken highlighting in sequence diagram with newline #30

Closed gtaylor1981 closed 4 years ago

gtaylor1981 commented 4 years ago

Highlighting is broken in sequence diagrams when a participant's label contains <br>. Example:

sequenceDiagram
    participant T as Highlighting<br/>broken
    Note over T: Highlighting<br/>working

Result: image

Perhaps the <br/> tag could have highlighting in a different colour to the text, here's an example I made in Paint:

image

Seen in v1.0.2

bpruitt-goddard commented 4 years ago

Thanks for reporting! I fixed the highlighting to match the Note line in your screenshot and released a new version with the fix. I also updated the readme example with the same code to avoid future regressions. I'll hold off on highlighting tags in different colors as that could get complex and it would be best to do it across all diagrams/text.