stable

Clone or download

Read-only

request #20579: Better management of mermaid syntax error

When you enter an invalid diagram syntax, the mermaid diagram continuously display a spinner, without giving any clue to the end user. Example of such syntax: ```mermaid graph TD A A -->|Get money| B(Go shopping) ``` The proposal is to see if mermaid has produced a svg with error. This svg is not used because it does not give any useful information. If we detect such svg, then we assume that the error that is being thrown is containing syntax error details. It is then displayed below the source diagram. Change-Id: Iad7922e8c7a2175887fa29bcc1095616397c182f

Modified Files

Name
M src/scripts/mermaid/mermaid-diagram-element.ts +57 −26 Go to diff View file
M src/themes/common/css/utils/_mermaid.scss +25 −4 Go to diff View file