plantuml / plantuml

Generate diagrams from textual description
https://plantuml.com
Other
9.73k stars 881 forks source link

<< style >> breaks multiline activities #1762

Closed gaspardpetit closed 2 weeks ago

gaspardpetit commented 2 weeks ago

Describe the bug Activities can be described on multiple lines, for example:

@startuml
:hello
world!!!;
@enduml

However, multiline actitivies do not work when a << style >> is provided.

To Reproduce Steps to reproduce the behavior:

  1. Observe that this example results in a multi-line activity: https://www.plantuml.com/plantuml/uml/SoWkIImgAStDuRBAICt9oUSgpo_AIL5KLBJcSaZDIm5A0000
  2. Observe that this example results in a styled activity: https://www.plantuml.com/plantuml/uml/SoWkIImgAStDuR8fBgdCIRNZIamkoIpBBAbqoKnCBqhCLQZcKb3GIqaipaXD2GQf00a0WKzcNYg4RmBartBLSjdeGqsmiL50LczdP-MHcfEJhn2UNvIJegYeQCtba9gN0hGJ0000
  3. Observe that this example results in a syntax error: https://www.plantuml.com/plantuml/uml/SoWkIImgAStDuR8fBgdCIRNZIamkoIpBBAbqoKnCBqhCLQZcKb3GIqaipaXD2GQf00a0WKzcNYg4RmBartBLSjdeGqsmiL50LczdP-MHcfEJhn2UNvIJegYeQCtba9gN0hGJ0000

Expected behavior From the following example, I was expecting to have a multiline styled activity:

@startuml
<style>
activityDiagram {
  .dashedStyle {
    LineStyle 4
  }
}
</style>
<< dashedStyle >>:Hello 
World!!!;
@enduml
The-Lum commented 2 weeks ago

Hi @gaspardpetit,

Here is the good usage of stereotype with multi-line activity:

@startuml
<style>
activityDiagram {
  .dashedStyle {
    LineStyle 4
  }
}
</style>
:Hello 
World!!!;<<dashedStyle>>
@enduml

Enjoy, Regards, Th.

gaspardpetit commented 2 weeks ago

Brilliant! Thanks!

The-Lum commented 2 weeks ago

[Just for the record,] See also ref. here: