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
70.54k stars 6.31k forks source link

Syntax error when drawing arrow (in graph) from a subgraph to same subgraph #5036

Open zgornel opened 9 months ago

zgornel commented 9 months ago

Description

Syntax error inside graph arrows when the source and destination point to the same subgraph

Steps to reproduce

  1. Copy and paste the code sample into the live editor

Screenshots

No response

Code Sample

graph LR;
    subgraph KB
        f_id0["a"]
        f_id1["b"]
    end
    KB-->KB

Setup

Suggested Solutions

No response

Additional Context

No response

jgreywolf commented 9 months ago

Looks like the error is related to cloning and setting the curve type to basis?

Failed to execute 'structuredClone' on 'Window': function curveBasis(t){return new Basis(t)} could not be cloned.