Page MenuHomePhabricator

Mermaid upgrade needed
Closed, ResolvedPublic

Description

from the example provided by MermaidJS

flowchart LR
    A:::foo & B:::bar --> C:::foobar
    classDef foo stroke:#f00
    classDef bar stroke:#0f0
    classDef foobar stroke:#00f

throws an error and will not render, initially thought this was just for styling in general but it seems to just be my actual usecase and this example case, so I'm not sure what about this exactly is causing an error

Event Timeline

@Yaron_Koren How can i solve these? i mean this website is different , how to raise PR and where is Code base?

@Vinay_Reddy18 - I can answer the questions, but first, I'm curious: do you have Flex Diagrams installed? If not, why do you want to solve this?

@Akaibu1 - I just looked into this; the problem seems to be the "&" in there, not the CSS stuff. I'm guessing that this was a bug in the Mermaid version used in Flex Diagrams (10.2.1) which has since been fixed.

By the way, the following syntax does work in Flex Diagrams instead, and produces the same output:

flowchart LR
    A:::foo --> C:::foobar
    B:::bar --> C:::foobar
    classDef foo stroke:#f00
    classDef bar stroke:#0f0
    classDef foobar stroke:#00f

So I think fixing this is just a matter of upgrading Mermaid.

Yaron_Koren renamed this task from CSS styling error to Mermaid upgrade needed.Mar 5 2024, 8:36 PM

Change #1016038 had a related patch set uploaded (by Yaron Koren; author: Yaron Koren):

[mediawiki/extensions/FlexDiagrams@master] Upgrade Mermaid to latest version, 10.9.0

https://gerrit.wikimedia.org/r/1016038

Change #1016038 merged by jenkins-bot:

[mediawiki/extensions/FlexDiagrams@master] Upgrade Mermaid to latest version, 10.9.0

https://gerrit.wikimedia.org/r/1016038

Yaron_Koren claimed this task.

It looks like this works, post-upgrade!