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
71.62k stars 6.49k forks source link

block labels in block diagram #5973

Open drdozer opened 4 days ago

drdozer commented 4 days ago

Proposal

The block-beta diagrams support block/end expressions that allow a block to contain other units. This is great, but it would be even more useful if the block could be named.

Would it work to place a label string directly after the block keyword?

Example

an unlabelled block, as we have now

block a b c end

a block that has the label "task2", which is rendered somewhere either within the block or before, above, below, after it

block "task 2" d e f end

Screenshots

No response

unawarez commented 4 days ago

There is syntax for this (maybe unintentionally) as demo'd in #5423

drdozer commented 3 days ago

There is syntax for this (maybe unintentionally) as demo'd in #5423

Interesting. I guess that's a functional hack.