core(mermaid): fix error when 3+ subgraph levels (#29970)

This commit is contained in:
Adrián Panella
2025-03-04 12:27:49 -06:00
committed by GitHub
parent 417efa30a6
commit c599ba47d5
3 changed files with 107 additions and 0 deletions

View File

@@ -145,6 +145,9 @@ def draw_mermaid(
for nested_prefix in edge_groups:
if not nested_prefix.startswith(prefix + ":") or nested_prefix == prefix:
continue
# only go to first level subgraphs
if ":" in nested_prefix[len(prefix) + 1 :]:
continue
add_subgraph(edge_groups[nested_prefix], nested_prefix)
if prefix and not self_loop: