Obsidian Links in Mermaid don't work for notes in vault root directory

Based on experience with Obsidian Links in Mermaid

Steps to reproduce

  1. Create a new folder in the vault root - say “TestFolder”.
  2. Create a note in the root directory - say “TestRootNote”.
  3. Create a note in the “TestFolder” folder - say “TestFolderNote”.
  4. Create a note in the root directory called “MermaidTest”.
  5. Create a code block in “MermaidTest” as follows:
graph LR;

AAA(AAA Note) --> BBB(BBB Note);

click AAA "/TestFolderNote";
click BBB "/TestRootNote";

class AAA internal-link;
class BBB internal-link;

Expected result

  1. Go to preview mode. You should see -
  2. Clicking on “AAA Note” will go to the correct note.
    Clicking on “BBB Note” should go to the correct note.

Actual result

  1. Clicking on “BBB Note” will give an error message “File already exists”.
    If “TestRootNote” is moved to the “TestFolder” then it will work.

Environment

Operating system: Mac OS 10.14.6

  • Obsidian version: 0.7.6

Additional information

The href on the BBB note does not resolve correctly.

3 Likes

We don’t explicitly support this. Moving to graveiard. There is already a feature request about supporting wiki links in mermaid and also a workaround using obsidian URI