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
Nice catch ! If you have the time to investigate the bug, I'll be happy to let you do a PR to correct it, as I'm not actively correcting bugs as of now.
@philiporlando seems to be fixed in #35 , I let you recheck
Looks great! Thank you for fixing this!