python_mermaid
python_mermaid copied to clipboard
The `hexagon` node shape is not rendered properly
This reprex shows that shape = "hexagon"
is translating to Mermaid as {{)}
instead of {{}}
, which results in a rendering error:
from python_mermaid.diagram import Link, MermaidDiagram, Node
# Family members
meg = Node("Meg", shape="hexagon")
jo = Node("Jo")
beth = Node("Beth")
amy = Node("Amy")
robert = Node("Robert March")
the_march_family = [meg, jo, beth, amy, robert]
# Create links
family_links = [
Link(robert, meg),
Link(robert, jo),
Link(robert, beth),
Link(robert, amy),
]
chart = MermaidDiagram(title="Little Women", nodes=the_march_family, links=family_links)
print(chart)
---
title: Little Women
---
graph
meg{{"Meg")}
jo["Jo"]
beth["Beth"]
amy["Amy"]
robert_march["Robert March"]
robert_march ---> meg
robert_march ---> jo
robert_march ---> beth
robert_march ---> amy