How can I make multiple-line state descriptions without having to type StateName: for every single line

0 votes
asked Apr 9 in Question / help by nickmaltas13 (120 points)
I am trying this tool for creating a very complicated FSM for work. Each state needs ~30 lines just to mention the individual signal updates happening for each state. Including " StateName:" in front of every description line creates unnecessary bloat in the code. Is there a better way to do this?

1 Answer

0 votes
answered Apr 9 by The-Lu (83,700 points)

Hello N.,

Currently state definition is only mono line. wink

Then awaiting new feature of multiline management:

Here are some workarounds, using %newline() or %n() builtin function, as:

@startuml
state s1 : line1
state s1 : line2

' old method (deprecated)
state s2 : line1 \nline2

' new method with newline built'in
state s3 : line1 %n()line2

state s4 : line1 %newline()line2
@enduml

See also doc. here:

Enjoy,
Regards,
Th.

...