Error when using whitespace in macro argument

0 votes
asked Sep 1, 2017 in To be sorted by anonymous

I get an error when calling a macro with an argument that contains whitespace. Is there a way to escape this?

 

Example:

@startuml
 
skinparam component<<custom_component>> {
backgroundColor blue
}
 
!define custom_component(label, name) component label as name <<custom_component>>
 
' works
custom_component("My_Custom_Component", my_custom_component)
 
'error
'custom_component("My Custom Component", my_component)
 
@enduml

1 Answer

0 votes
answered Sep 19, 2017 by plantuml (295,000 points)

You should add quotes in your macro definition:

!define custom_component(label, name) component "label" as name <<custom_component>>
 

...