Mermaid Fixer: updates about ability to fix quadrant charts

Disclaimer

Is this project open source? Yes
Is this project completely free? Yes
Is this project vibe-coded beyond the author’s ability to comprehend how it works? No.
Community Directory: Mermaid Fixer

Hi all! This is Rosetta, the apple again :red_apple:

Mermaid Fixer has been in the Community Directory for a little while now, and I have been steadily maintaining it as I run into more real-world Mermaid blocks that are “almost correct” but still fail in Obsidian preview.:warning:


Today’s update improves Mermaid repair around:

  • :red_apple:quadrantChart axis and quadrant labels, especially unquoted labels and nested quotes in titles
  • :red_apple:xychart-beta / line chart syntax, especially titles, categories, and labeled series generated in a not-quite-Mermaid format

Here is a small quadrant chart example related to the maintenance work:

quadrantChart
    title Mermaid Fixer repair map
    x-axis "Rare edge cases" --> "Common patterns"
    y-axis "Manual cleanup" --> "Automatic repair"
    quadrant-1 "High priority rules"
    quadrant-2 "Quick wins"
    quadrant-3 "Needs examples"
    quadrant-4 "Watch list"
    "Quadrant labels": [0.75, 0.82]
    "Line chart syntax": [0.70, 0.76]
    "Flowchart labels": [0.82, 0.62]
    "Unknown parser errors": [0.25, 0.28]

And a line chart example:

xychart-beta
    title "Mermaid Fixer release coverage"
    x-axis ["1.1.5", "1.1.7", "1.1.8"]
    y-axis "Example fix cases" 0 --> 100
    line "Mermaid rules" [45, 68, 82]

This plugin is not trying to be a complete Mermaid formatter or a replacement parser. It focuses on common, repeatable, safe repairs that show up in notes, AI-generated drafts, meeting notes, specs, and documentation.


I still occasionally find Mermaid syntax that the plugin does not repair correctly. When that happens, I patch the rule set and add regression tests.

If you find a Mermaid block that still fails after running Fix current file, please let me know. The most useful report includes:

  • the original Mermaid block
  • the parser error shown by Obsidian or Mermaid Fixer
  • whether the diff preview changed anything
  • your plugin version and Obsidian version, if convenient

Latest release: 1.1.8
Bug reports / examples: GitHub issues

Thanks to everyone who tries it on messy real notes. Those edge cases are exactly what make the plugin better.:red_apple::grinning_face_with_smiling_eyes:

# Mermaid Fixer + Mermaid ELK Renderer

Hi! SmolBlackHole here, maintainer of Mermaid ELK Renderer. Found Mermaid Fixer while browsing and our plugins overlap in a way that seems worth bringing up.

Mermaid Fixer repairs broken syntax in Mermaid blocks before they hit the renderer. Mermaid ELK Renderer enables the ELK layout engine and can optionally load Mermaid 11.16.0 instead of Obsidian’s older built-in version.

I suspect some diagrams your plugin currently “fixes” are actually valid Mermaid 11 syntax that Obsidian’s old renderer simply rejects. If Mermaid Fixer validated against the bundled 11.16.0 my plugin ships, fewer manual fixes would be needed. The ones that were still broken would render with the latest engine.

A few ways this could go:

  • Cross link each other’s READMEs. Low effort, right now. "Syntax broken? Try Mermaid Fixer. Rendering fails? Enable bundled Mermaid 11 in ELK Renderer.
  • Share the Mermaid 11.16 bundle. Mermaid Fixer detects my plugin is installed and uses its 11.16.0 for validation. Both plugins keep doing their own thing otherwise
  • Merge into one plugin. Fixer handles the text repair pipeline, ELK Renderer handles layout and the Mermaid version. One install, both problems solved

Both MIT licensed. If none of this clicks for your roadmap, no worries. Just wanted to put it on your radar.

Hi SmolBlackHole! This makes a lot of sense to me.

I agree the first low-effort step is cross-linking the READMEs.

Mermaid Fixer should ideally validate against the renderer the user is actually going to use. :red_apple:If a vault only has stock Obsidian Mermaid, fixing toward stock Obsidian compatibility is still useful.

:red_apple:But if Mermaid ELK Renderer is installed and bundled Mermaid 11 is enabled, it would be great if Mermaid Fixer could detect that and validate against the newer runtime instead.

A possible path:

  1. Cross-link both READMEs. Something like:

    Syntax broken? Try Mermaid Fixer - Obsidian Plugin.
    Layout fails, ELK is needed, or stock Obsidian’s Mermaid is too old? Try Mermaid ELK Renderer - Obsidian Plugin with bundled Mermaid 11 enabled.

    Collect a few examples where Mermaid Fixer changes something that is valid Mermaid 11 but rejected by Obsidian’s older renderer.

  2. Fixer can detect Mermaid ELK Renderer, detect whether bundled Mermaid 11 is enabled, and use that runtime for validation only.

I can start with README cross-links and open an issue to track the validation/runtime experiment. Thanks for reaching out and bringing this up!

Hi SmolBlackHole!

I’ve updated on my side, see Mermaid Fixer - Obsidian Plugin release 1.1.10 or check the github repo ---- let’s keep in contact and see what we can do :red_apple:ヾ(•ω•`)o