Complex mermaid only working in live preview mode

Title says it all, some mermaid graphs from Mermaid Live Editor can be pasted in obsidian and work, but only in live preview.

Steps to reproduce

Copy / create a Mermaid Graph (Gantt, ER, User Journey, Git…)
Paste in Obsidian
Toggle between live preview and read only

Expected result

Mermaid Graph displaying in preview mode as well

Actual result

Error messages

“Error parsing Mermaid diagram” (see Additional Information for screenshots)


Debug info (from my actual vault but same issue in the sandbox vault):
Obsidian version: v1.2.1
Installer version: v1.1.9
Operating system: Windows 10 Home 10.0.22621
Login status: logged in
Catalyst license: insider
Insider build toggle: on
Live preview: on
Legacy editor: off
Base theme: light
Community theme: none
Snippets enabled: 10
Restricted mode: off
Plugins installed: 82
Plugins enabled: 58
1: Calendar v1.5.10
2: Hotkeys++ v0.2.7
3: Better Word Count v0.9.6
4: Recent Files v1.3.5
5: Excalidraw v1.8.22
6: Hider v1.2.4
7: Emoji Toolbar v0.4.0
8: Admonition v9.2.1
9: Obsidian Charts v3.7.1
10: QuickAdd v0.17.1
11: Natural Language Dates v0.6.1
12: Dataview v0.5.55
13: Tag Wrangler v0.5.8
14: Search on Internet v0.5.0
15: Footnote Shortcut v0.0.9
16: Settings Search v1.3.7
17: Note Refactor v1.7.1
18: Kanban v1.5.2
19: Smart Random Note v0.2.1
20: Typing speed v1.1.2
21: YouHaveBeenStaring v1.2.2
22: Link Headers Directly v1.0.2
23: Journey v0.0.7
24: Quick Switcher++ v3.0.0
25: Mind Map v1.1.0
26: Tracker v1.10.9
27: Templater v1.16.0
28: Book Search v0.5.9
29: Omnisearch v1.13.0
30: Frontmatter Tag Suggest v0.4.1
31: Advanced Tables v0.18.1
32: Search Everywhere v1.0.10
33: Hover Editor v0.11.9
34: Paste URL into selection v1.7.0
35: Projects v1.13.0
36: Plugin Update Tracker v1.4.6
37: Emoji Shortcodes v2.2.0
38: Image Caption v0.0.15.alpha
39: Timelines v0.3.2
40: Vault Statistics v0.1.3
41: Paste image rename v1.6.1
42: Auto Link Title v1.4.1
43: Text Format v2.2.1
44: Mousewheel Image zoom v1.0.16
45: Periodic Notes v0.0.17
46: Keyshots v1.5.0
47: Pending notes v0.6.2
48: Readwise Official v2.0.1
49: ProZen v0.3
50: Minimal Theme Settings v6.3.1
51: Style Settings v1.0.3
52: Workspaces Plus v0.3.3
53: Advanced URI v1.34.0
54: Hotkey Helper v0.3.16
55: Text Extractor v0.4.3
56: Contextual Typography v2.2.4
57: Obsidian_to_Anki v3.4.2
58: Obsidian42 - Strange New Worlds v1.1.4

Additional information

works fine in preview mode

But not in read only

the problem is that you copy paste “non breaking white spaces” &nbsp. you need to remove those.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.