huterguier / obsidian-mehrmaid

MIT License
19 stars 2 forks source link

Link to Headings #2

Open UsefullPartBrad opened 4 months ago

UsefullPartBrad commented 4 months ago

I love this extension of the base mermaid code. I would really like to be able to link to headings in my files "[[file#heading|heading]]" But this doesn't seem to work. Another useful notation would be "[[#heading in same document|mask text]]"

huterguier commented 4 months ago

Can you go into detail about this problem? Maybe just give an example in which this notation fails? Because for me both notations seem to work fine as is.

```mehrmaid
graph
    A["[[#Example Heading]]"]
    B["[[bayesian network#Questions|Other Heading]]"]

    A --> B

![Screenshot from 2024-04-16 15-38-24](https://github.com/huterguier/obsidian-mehrmaid/assets/47152172/e3c60d16-eedc-41ac-a9ce-abdfe1e2b539)
CaptainKludge commented 4 months ago

I am having the same problem. It is when I am linking to a heading in the same note. image

image

huterguier commented 3 months ago

Ah okay, i see where the problem is. The thing is, the mehrmaid plugin doesn't actually overwrite the existing mermaid codeblock. So you'll have to use "mehrmaid" instead.

```mehrmaid
flowchart TD
a --> b
a["[[example#Metabind|Metabind]]"]