Mermaid no longer render links #106690
Replies: 10 comments 8 replies
-
It's not just links that have stopped working. Other HTML elements (other than flowchart TD
Existing("<h2>The title</h2><i>Subtitle</i><br>Multi-line content<br>still works.")
|
Beta Was this translation helpful? Give feedback.
-
I'm also seeing this issue |
Beta Was this translation helpful? Give feedback.
-
Got bitten by this as well. It seems that using mermaid's click functionality provides a partial workaround for links specifically: oddly, the cursor hand shows up and the url is shown on mouseover, but clicking does nothing. Command/ctrl clicking, however (to open in a new tab), does work. This of course wouldn't address the formatting issue, but on the topic of links, it would be nice if the click functionality worked as well. (However, whereas formatting was working fine and suddenly broke, I'm not sure click functionality ever worked on github.) |
Beta Was this translation helpful? Give feedback.
-
Was there some release that broke this functionality? What is the right way to report it to GitHub as a bug? |
Beta Was this translation helpful? Give feedback.
-
This seems to be some change by GitHub internally, as the version of mermaid they are using is still 10.0.2, which is almost a year old. info
|
Beta Was this translation helpful? Give feedback.
-
Possibly rolled into the same regression, but I've also just noticed that the background of edge labels is now translucent, which really damages readability. For example: graph LR
source -- The background should be opaque --> sink
|
Beta Was this translation helpful? Give feedback.
-
It looks like exposing securityLevel='loose' in some way would alleviate this problem. |
Beta Was this translation helpful? Give feedback.
-
HTML Links are apparently thankfully working now, but it seems markdown links still aren't: graph TB
node1["<a href='https://github.com/'>A link to GitHub</a>"] --> node2["`[Unfortunately not a link to GitHub](https://github.com/)`"]
Source:
Is this an intentional decision on GitHub's part? Or is it something to do with mermaid? |
Beta Was this translation helpful? Give feedback.
-
I'm also seeing text with a link that is not formatted as a markdown link getting interpreted as a markdown link, which then fails to render. For example: flowchart TD
gh("This should be the url for github.com: https://github.com")--should be-->ghspace("h ttps://github.com<br/>but without the space.")
In my case, I want the URL to appear literally, not as a link, and I haven't found a way to do that because it's automatically getting picked up and translated into a non-functioning format. |
Beta Was this translation helpful? Give feedback.
-
I came across the same problem when displaying a link in a text of a relation. This does not work :
flowchart LR
CLIENT((client)) ---->|"http://myapp.example.com"| BROWSER
To bypass the limitation, I simply added an invisible character after "http" (for example a Left-to-right-mark), and that's it ! :
flowchart LR
CLIENT((client)) ---->|"http://myapp.example.com"| BROWSER
|
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Bug
Body
This used to work at least few days ago but now all Mermaid diagrams allow only text and no HTML, links or clicking. Is this intentional? Has the global securityPolicy changed to 'strict' perhaps? Or Mermaid might have been updated and newly defaults to 'strict'?
Example:
This diagram is still working fine on crates.io:
https://crates.io/crates/agdb#decision-tree
But no longer on GitHub where it is coming from:
https://github.com/agnesoft/agdb?tab=readme-ov-file#decision-tree
Minimum reproduction (HTML nor markdown links work):
Beta Was this translation helpful? Give feedback.
All reactions