How to write a multi-line note containing lines with heading spaces ?

0 votes
asked May 7, 2018 in Question / help by anonymous

Hey there,

I am trying to write a multiline note, where some of the lines have heading spaces.

Concretely, in the diagram:

@startuml

A->B
B->C
note right of B : \"First line\n    second line (indented)\n    third line (indented)\nLast line\"
D->C

@enduml

I would like to write the note in a multiline format instead, but keeping the result (where the second line and then third line are "indented" with some heading spaces)

Is there any way to do that?

Thank you in advance :-)

1 Answer

0 votes
answered May 8, 2018 by Serge Wenger Work (13,180 points)

Hello,

As I understand:

@startuml
A->B
B->C
note right of B
First line
        second line (indented)
        third line (indented)
Last line
end note
D->C
@enduml
http://www.plantuml.com/plantuml/png/SoWkIImgAStDuNBKjNFYSjArS-RAooz9LIZAJCyeKSXFKt3YudJBB2ekKSZ9p4lbKe22ujJa_BmKi9Y2HcPUIcfUIMgA9bow92Ep25EMqoSHPaugK3F87YuNa8qEG2x83G00
commented Nov 11, 2019 by Winux
I tried copying this code and pasting it in my websequencdiagrams project and didn't work.
second line and thirdline wasn't indented.
commented Nov 11, 2019 by Serge Wenger Work (13,180 points)
...