mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
68.69k stars 6.07k forks source link

Background not rendered for link label with math formula #5543

Open skylee03 opened 1 month ago

skylee03 commented 1 month ago

Description

When there is a math formula in the link label, the background color cannot be properly rendered.

Steps to reproduce

See live editor example.

Screenshots

Code Sample

flowchart RL
  subgraph A["$$A$$"]
    a(($$a$$))
  end
  subgraph B[""$$B$$""]
    b(($$b$$))
  end
  a-->|"g: B \to A"|b
  b-->|"$$f: A \to B$$"|a

Setup

Suggested Solutions

No response

Additional Context

No response