Skip to content

Mermaid Export Fit 1.0.2

Latest

Choose a tag to compare

@rosetta-guo-fyaic rosetta-guo-fyaic released this 04 Aug 11:59

What's fixed

Wide Mermaid diagrams were still clipped in exported PDF/HTML even with the plugin enabled. Two root causes:

  • Timing: Mermaid renders its SVG asynchronously after the markdown post processor ran, so the plugin's fitting markers were never attached. A MutationObserver now catches late-rendered diagrams.
  • CSS: Mermaid writes inline max-width/width styles on the SVG which beat the plugin's stylesheet. Override rules now use !important, and print rules no longer depend on plugin-added element markers (which are unreliable in the re-rendered print DOM). All Mermaid diagrams scale to page width on export unless export fitting is disabled in settings.

Verify

Open a note with a very wide Mermaid diagram, export to PDF, and the full diagram now fits the page width. For very wide diagrams, Landscape orientation in the export dialog gives the best readability.