Calling procedure adversely affects subsequent use of defined variable.

0 votes
asked Nov 12 in Bug by stan4d (140 points)

The following example shows three links to the PlantUML site followed by a bulleted list.  

The first two work fine.  The last, which calls a defined procedure, does not.  It's use of the $bullet variable no longer works after the call to the procedure.

Example:

@startuml

skinparam defaultTextAlignment left

!$bullet = "<U+2022>"

!define PLANTUML_DOCS_1 [[https://plantuml.com/ Docs]]

!procedure $plantuml_docs_2()
[[https://plantuml.com/ Docs]]
!endprocedure

title Example

state A
state B
state C
state D

A --> B : PlantUML [[https://plantuml.com/ Docs]]:\n $bullet Alfa\n $bullet Bravo\n $bullet Charlie

B --> C : PlantUML PLANTUML_DOCS_1:\n $bullet Alfa\n $bullet Bravo\n $bullet Charlie

C --> D : PlantUML $plantuml_docs_2():\n $bullet Alfa\n $bullet Bravo\n $bullet Charlie

@enduml

1 Answer

+1 vote
answered Nov 13 by kirchsth (7,140 points)

Hi @stan4d,

I'm surprised that it works at all (a procedure produced from my understanding line breaks, but I didn't check the details until now).
If you want exact the same output without additional lines,... you need a function (the image is linked with the source)

BR Helmut

commented Nov 13 by anonymous
Hi @kirchsth

Good workaround.  Thanks!
...