pypi / sphinxcontrib-mermaid
sphinxcontrib-mermaid
What changed in sphinxcontrib-mermaid 1 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
4 breaking8 new APIs and options1 performance4 behavior and defaults17 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initsphinxcontrib-mermaid 218 changes
Breaking changes 1
Support for Python 3.8 and 3.9 was dropped.
New APIs and options 5
Adds an option for passing a global Mermaid configuration.
Adds mermaid_dark_theme as a config option for configurable theme switching.
Adds mermaid_light_theme as a config option for configurable theme switching.
Exports runMermaid to window for frontend hot reloading.
Dynamic theme changes are now supported.
Performance 1
Loads the ZenUML plugin only on pages that contain a ZenUML diagram.
Fixes and other changes 11
Generated Mermaid caption nodes preserve source metadata so Sphinx can extract them into gettext catalogs and apply normal caption translations.
The HTML visitor passes the existing Mermaid image class through, making PNG output consistently targetable with CSS.
Fixes d3 zoom on nested SVGs.
Fixes fullscreen button positioning inconsistency.
Fixes interactions between the fullscreen, zoom, and lazy-render features.
Skips injecting Mermaid JavaScript when the output format does not support it.
Confines the injected ZenUML stylesheet to the diagram subtree so it no longer restyles the host theme.
Root-level pages now use a valid relative ES module specifier for local JS module imports.
Diagrams hidden by a parent are rendered when they become visible, fixing broken SVGs.
mmdc error messages are captured as strings for nicer error display.
Local Mermaid, ELK, ZenUML, and D3 JavaScript paths are resolved under html_static_path.
sphinxcontrib-mermaid 116 changes
Breaking changes 3
The fullscreen container class is renamed from mermaid-fullscreen-content to mermaid-container-fullscreen.
The default placeholder changes from div to pre.
Support for Python 3.7 is dropped.
New APIs and options 3
Adds fullscreen graph view capabilities.
Adds support for ELK diagrams.
Adds support for the name parameter.
Behavior and default changes 4
Chart size defaults are adjusted to more closely resemble previous defaults.
Graphs are made full width, avoiding unused margins in the graph image.
The default CDN for JavaScript assets changes from unpkg to jsdelivr.
Mermaid frontmatter is now passed through.
Fixes and other changes 6
Fixes an issue with ELK charts by upgrading the ELK plugin.
Hotfixes inclusion of CSS/JS assets via the old MANIFEST mechanism.
Fixes an issue with fullscreen classes after rebase.
JavaScript is normalized across various configuration options.
Fixes handling of Mermaid sequence config arguments.
Fixes tempfile encoding when content contains non-ASCII characters.