asciidoctor / asciidoctor-vscode

AsciiDoc support for Visual Studio Code using Asciidoctor
Other
340 stars 97 forks source link

mermaid.js support in preview #886

Closed ztuowen closed 5 months ago

ztuowen commented 5 months ago

Having to contact a server (kroki) is annoying and I can't use the preview because of security concerns.

This adds a mini-extension into the html previewer that processes mermaid diagrams with <pre class=mermaid> that mermaid.js accepts.

Saving to html feature doesn't work because the saved HTML doesn't load mermaid.js which I haven't figured out how to do.

This will be disabled if the user enables kroki which will allow them to save correctly.

resolves #571

ggrossetie commented 5 months ago

It looks good thanks!