Mermaid integration showing arrow tips - it shouldn't!

Steps to reproduce

  1. Create new note.
  2. Copy the following mermaid diagram code:
flowchart LR
A --- B

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

A line between A and B without arrow tips. It’s called an “open link” by Mermaid.
I cant share the link to the Mermaid documentation.
Marmaid Documentation → “Syntax” → “Flowchart” → “An open link”

Actual result

I see a link between A and B with an arrow head pointing towards B.
The rendered diagram is identical to the following code, it shouldn’t.

flowchart LR
A --> B

Environment

SYSTEM INFO:
Obsidian version: v1.8.9
Installer version: v1.6.7
Operating system: Windows 11 Home 10.0.26100
Login status: logged in
Language: en
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

Expected result (screenshot from Mermaid.js documentation)

Actual result in Obsidian:

4 Likes

I’m also seeing this bug, on v1.8.10.

There was a change in how Obsidian renders mermaid fairly recently (not sure exact version) that seems to have brought this bug. It was the change that caused the nodes to have purple outlines.

This could be a Mermaid (v 11.4.1) bug: Link --- show arrow but have to be without · Issue #6289 · mermaid-js/mermaid · GitHub :woman_shrugging:
(Obsidian updated Mermaid to Mermaid v11.4.1. with the release of Obsidian 1.8.5 :blush: )

2 Likes

This seems to be fixed in mermaid (now up to version 11.10.1).

This bug is still present in Obsidian Version 1.9.12.

Mermaid graphs that have undirected edges should appear as a line rather than have an arrow

repo:

graph
	A((A)) --- B((B))

Expected:
two nodes with a single line between them

Actual
image

I’m not allowed to include the link to the doc but it is in Mermaid js org → syntax → flowchart → “An open link”

should work with both graph and flowchart and does not