bpruitt-goddard / vscode-mermaid-syntax-highlight

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

Complex Graph Arrow Highlighting #4

Closed bpruitt-goddard closed 2 years ago

bpruitt-goddard commented 5 years ago

There are cases where the first hyphen of the arrow get highlighted as text instead of the arrow color. This is seen in the graph screenshot, line ~8, for the example

ID-2--Link between 2 and 3---ID-3

note that the first hyphen after 3 is still the string text color.

This can be fixed by duplicating the string regex, but removing the hyphen in the second group and requiring one or more characters (+) from that group, but that doesn't feel ideal.

bpruitt-goddard commented 2 years ago

This was fixed by #74 and a test was added for this exact use case