Markdown and HTML both do not work with internal-link in with mermaid.js

What I’m trying to do

I am trying to make a flow chart where the Node boxes are internally linked to pages explaining each step in the flow chart in detail.

The node should have a header and a few bullet point subheaders with a color circle emoji linking it to a color code.

Things I have tried

H("`Header
subheader1
subheader2`")

click H "obsidian://open?vault=QMS&file=file_path_here"
class H internal-link;

This works in the mermaid live editor, but in obsidian, it smashes everything into one long single line where the words are a link and not the box.

The feature request workaround here

    H("<b>Header</b> <br> <a class='internal-link is-unresolved' href='path/to/file'>subheader with link</a>")

    class H internal-link;

In the Mermaid live editor, header in bold and the second line has the link.

In obsidian, both of these cases do not work as they do in vanilla mermaid. There seems to be no way to put more than 1 line in a node text with an obsidian link.

It seems that using internal-link destroys all markdown and HTML in mermaid and any node involving a link just gets smashed in 1 line that mermaid itself doesn’t see, so even the node box is formatted correctly according to the formatting which causes the text to break out of the node boundaries.