Mermaid-Chart / vscode-mermaid-preview

Previews Mermaid diagrams
MIT License
148 stars 16 forks source link

Preview does not update when transitioning from parse error to valid syntax #91

Closed Pugio closed 4 years ago

Pugio commented 4 years ago

As soon as I enter in any kind of invalid Mermaid syntax, the Preview pane clears and refuses to display anything else thereafter.

Expected behaviour

graph TD
A

If I then type:

graph TD
A--

The pane clears.

Actual behavior

graph TD
A-->B

image

Pugio commented 4 years ago

Upon further inspection, it also seems as though the Mermaid renderer is also receiving the source text with all newlines stripped out:

image

vstirbu commented 4 years ago

Thanks for reporting this behaviour. I'm able to reproduce it.

(I'm a bit overloaded now, so it will take some time to work on a fix...)