Update mermaid.js included in obsidian

Use case or problem

Modern versions of mermaid.js include important functionality like subgraph-to-subgraph linking and subgraph directionality.

Proposed solution

Upgrade version of mermaid.js included in obsidian (and document the included version somewhere? Perhaps in Help → Formatting Notes?).

Current workaround (optional)

Use an external rendering engine for mermaid. Unpleasant experience, as I now need a full node/JS toolchain on each computer I have obsidian on.

4 Likes

I would like to add my voice to this request.

Newer Mermaid releases have tons of updates and fixes. One example is gitGraph mode, which only had rudimentary support until now: mermaid used in the most recent Obsidian version (0.14.10) doesn’t even understand tags and commit ids, and breaks on trailing spaces.

As far as I know, there’s no good alternative:

  • gitgraph.js seems to be semi-abandoned since a couple of years
  • all other diagramming tools don’t offer any features specific to DAG – just plain diagramming stuff
  • and, despite Excalidraw being realy awesome, nobody wants to draw git commit graphs by hand.

On that note, do Obsidian devs use some kind of dependency update tool (Snyk/dependabot)?

1 Like

This has been implemented in Obsidian 0.15.2, now latest features of gitGraph mode work great! This code

```mermaid
gitGraph:
	commit tag:"release-1.0"
	branch development
	checkout development
	commit tag:"super-feature"
	checkout main
	merge development tag:"release-2.0"
	checkout development
	commit tag:"bugfix1"
	commit tag:"bugfix2"
	commit tag:"bugfix3"
	checkout main
	merge development tag:"release-2.1"
	commit
```

now produces this image:

Thanks very much @Licat and @Silver!

3 Likes

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