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.