LogicBlocks
LogicBlocks copied to clipboard
feat: support Mermaid diagrams by default
It was brought to my attention recently that GitHub can render Mermaid diagrams inside markdown beautifully.
Mermaid's state diagrams are almost identical to the ones used by PlantUML, except it doesn't support nested state descriptions, which is what the logic blocks generator is currently making.
So instead of this:
state "State1" as state_one {
state_one : text
}
We need to flatten it out, like this:
state "State1" as state_one
state_one : text
I did modify the generator to produce flatter state descriptions. Unfortunately, this is still blocked by the lack of support for composite states with descriptions: mermaid-js/mermaid/issues/1493