Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mermaid.js support in preview #886

Merged
merged 2 commits into from
Jun 13, 2024
Merged

Conversation

ztuowen
Copy link
Contributor

@ztuowen ztuowen commented Jun 11, 2024

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
Copy link
Member

It looks good thanks!

@ggrossetie ggrossetie merged commit 714a090 into asciidoctor:master Jun 13, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use mermaid.js for diagrams
2 participants