Mermaid crashes with a local diagram init directive

I attempted to configure a mermaid graph locally today and found that the Mermaid component fails and requires a restart to get diagram rendering to resume. I have toggle preview/edit bound to something like Command-E. Attached are some screenshots with the developer console opened.
Rendered:


Toggled to show source…

Inserted an init directive…

Toggled and it renders but throws an error

After that toggling edit/preview only shows this bold source mode even if I remove the init directive. Diagrams resume working after a restart.

These part of mermaid doesn’t even work well in their live editor. I believe they still have to finish to implement. The documention of this part has also 2/3 different syntaxes.
Long story short. When this works well upstream, we’ll look at it.

1 Like