Mermaid links to honour headers/URL fragments

In case anyone else stumbles across this asking the same question, I followed this Forum Post and got mermaid linking.

Simply define a class (after the graph) as an internal-link and then what you place in the class brackets (Also the displayed text) is the destination mermaid will link e.g.

graph TD;
	Test("Document#heading")-->Point;
class Test internal-link;

Graph working representation