Mermaid bug example: Difference between revisions

From CCMDB Wiki
Jump to navigation Jump to search
(Created page with "This page demos strange behaviour of mermaid links on mediawiki. It has been posted as a bug in [https://github.com/knsv/mermaid/issues/844#issuecomment-498946915 Bug report to Mermaid base code]. == Strange behaviour of Mermaid links == When given a page name as input to the "click" command, the mermaid extension doesn't use the base URL of the wiki correctly, it simply uses the domain name. This means that the index.php part is missing and the link doesn't work. {{#...")
 
 
Line 5: Line 5:


{{#mermaid:graph TD;
{{#mermaid:graph TD;
  A("wiki link, ie just the page name")-->B("full URL link");
  A("wiki link, ie page name")-->B("full URL link");
  click A "[[Tina Tenbergen]]"
  click A "[[Tina Tenbergen]]"
  click B "https://wiki.umintmed.ca/index.php?title=Tina_Tenbergen"
  click B "https://wiki.umintmed.ca/index.php?title=Tina_Tenbergen"

Latest revision as of 10:15, 2023 March 8

This page demos strange behaviour of mermaid links on mediawiki. It has been posted as a bug in Bug report to Mermaid base code.

Strange behaviour of Mermaid links

When given a page name as input to the "click" command, the mermaid extension doesn't use the base URL of the wiki correctly, it simply uses the domain name. This means that the index.php part is missing and the link doesn't work.

The graph is created by the following code:

{{#mermaid:graph TD;
 A("wiki link, ie just the page name")-->B("full URL link");
 click A "Tina Tenbergen"
 click B "https://wiki.umintmed.ca/index.php?title=Tina_Tenbergen"
}}