Mermaid: arrows not showing

Steps to reproduce

Create a mermaid erDiagram:

erDiagram
	FOO ||--|{ BAR :baz

Switch to Preview
Diagram looks good

Switch back to edit
Open new tab next to in preview mode (ctrl-click the edit button)
Accents on the diagram dissappear
Close other tab
Accents re-appear

Expected result

Accents should always be there

Actual result

They are not

Environment

  • Operating system: Ubuntu 18.04
  • Obsidian version: 0.8.15

Possibly a weird upstream bug.

Steps to reproduce

  1. Use the following mermaid sequence diagram:
sequenceDiagram
	participant User
	participant Service
	User ->> Service: yo do dis ding
	Service-->>User: gotshu
	User -->> Service: wassupp
  1. Toggle to Preview, notice the arrowheads are displaying
  2. Toggle back to Edit, then open Preview to the side
  3. Notice the arrowheads are gone

Expected result

To see the arrowheads in the preview even with split mode.

Actual result

Arrowheads are not displayed.

Environment

  • Operating system: Win 10
  • Obsidian version: 0.12.12

Additional information

In split view:


With only Preview on:

While the screenshot is with custom CSS, I tried also without and it had no effect.

Steps to reproduce

  1. create note
  2. add mermaid code block like this:
```mermaid
classDiagram
	Klasse o-- Klasse2 : Aggregation
\```

(ignore the backslash)
3. export as pdf

Expected result

pdf with the mermaid graph with the correct arrow types

Actual result

any arrow type will be removed
AubTCxPGJS

Environment

  • Operating system:
    Windows 10
  • Obsidian version:
    0.11.13

Hello. Can you guide me how to fix this? I can’t get it.

Steps to reproduce

  1. Create following diagram
sequenceDiagram
Alice->>Bob: Hello!
Bob-->>Alice: Hello back!
  1. Export to PDF and open.

Expected result

Arrows should be visible in PDF.

Actual result

Arrows are cut off

In Obisidian, everything looks good
image

PDF Export settings:

Environment

  • Operating system: Windows 10
  • Obsidian version: v0.12.15

Steps to reproduce

  1. Add the following mermaid chart to a note:
```mermaid
flowchart
	step1[Some Step Here]
	step2[Another Step Here]

	step1 --> step2
```
  1. Toggle between reading mode and editing mode until the arrow heads disappear. You may also need to go into and out editing the block with live preview. It will periodically no longer render the directional arrow heads between steps.

Expected result

It always renders the arrow heads.

Screenshot from 2021-12-28 08-47-45

Actual result

Sometimes it will not render the arrow heads.

Screenshot from 2021-12-28 08-47-37

Environment

  • Operating system: Pop! OS (Linux)
  • Debug info:
SYSTEM INFO:
	Obsidian version: v0.13.14
	Installer version: v0.13.14
	Login status: logged in
	Catalyst license: none
	Insider build toggle: off
	Live preview: on
	Legacy editor: off
	Base theme: dark
	Community theme: none
	Snippets enabled: 0
	Safe mode: off
	Plugins installed: 0
	Plugins enabled: 0

RECOMMENDATIONS:
	none

@WhiteNoise FWIW, I did search but this thread didn’t show up. :man_shrugging:

Also, this is likely not an upstream bug, or if it is it has since been patched. When copying the graph into https://mermaid.live it has no issues rendering the arrow heads, and even in Obsidian it periodically can render them just fine. See above repro steps for potential causes.

I suspect one of the scenarios when loading in Obsidian does not properly initiate the graph.


In my case, when I turn the “use legacy editor” button on, the “mermaid arrow” show well in “reading view”. In the contrary, those arrows all disappeared.

I think that is a incompatibility problem between new editor mode and plugin.
In other Apps, like “Typora”, did not have this “mermaid arrow” issue.