Add MermaidExtension for rendering Mermaid.js diagrams#131
Merged
dereuromark merged 1 commit intomasterfrom Mar 26, 2026
Merged
Add MermaidExtension for rendering Mermaid.js diagrams#131dereuromark merged 1 commit intomasterfrom
dereuromark merged 1 commit intomasterfrom
Conversation
- Transform mermaid code blocks into Mermaid.js-compatible markup - Support pre/div tag options - Optional figure wrapper for semantic markup - Preserve custom attributes and classes - Comprehensive documentation with JavaScript integration guide
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #131 +/- ##
============================================
+ Coverage 93.94% 93.98% +0.03%
- Complexity 2385 2407 +22
============================================
Files 81 83 +2
Lines 6310 6379 +69
============================================
+ Hits 5928 5995 +67
- Misses 382 384 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MermaidExtensionthat transforms code blocks with languagemermaidinto Mermaid.js-compatible markup<pre>or<div>tag optionsUsage
Input:
Output:
Configuration
tagstring'pre''pre'or'div')cssClassstring'mermaid'wrapInFigureboolfalse<figure>figureClassstring'mermaid-figure'Supported Diagram Types
Flowcharts, sequence diagrams, class diagrams, state diagrams, ER diagrams, Gantt charts, pie charts, git graphs, mindmaps, timelines, and more.
See https://mermaid.js.org/ for full Mermaid documentation.