mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
72.02k stars 6.54k forks source link

Click Anchors #5696

Open PiRomant opened 3 months ago

PiRomant commented 3 months ago

Description

Anchors in click generates wrong links. This makes it more difficult to create navigation in single-page articles directly from the graph.

Steps to reproduce

flowchart TD
a(clicks) --> b(anchor dont work)
a(clicks) --> c(only full link work)

click b "#issuecomment-2272669141"
click c "https://github.com/mermaid-js/mermaid/issues/5696#issuecomment-2272669141"

Screenshots

No response

Code Sample

click b "#header"


### Setup

_No response_

### Suggested Solutions

_No response_

### Additional Context

_No response_
PiRomant commented 3 months ago

Looks like in a Github Issue anchors dont work with headers. Here is another example with header: https://gist.github.com/PiRomant/b39896436f445c315d289baeee9fefc1