Line breaks in !function !return (how?) (preprocessorV2)

0 votes
asked May 29, 2019 in Bug by boshka (3,040 points)
edited May 29, 2019 by boshka
Could you help with the below?

how to specify multi-line result in the !function? The below does not work:

!function myFunction(arg)
           !return ":myFunction();\nnote right\ncalled with\n" + arg + "\nend note"


Also, is there a more convenient way for that like in legacy versions (i want some function to return just some plantuml multiline code fed with the function arguments)?

1 Answer

0 votes
answered May 29, 2019 by plantuml (225,980 points)

You can use void function instead of return function in that case.

!unquoted function my_Function($arg)
note right
called with
end note


Is this what you are looking for ?

commented May 29, 2019 by boshka (3,040 points)
yes, many thanks (sorry, missed this in the migration notes)
commented May 30, 2019 by boshka (3,040 points)
I also noticed, that you can still define and use a function without a !return as follows:

!function myFunction(arg)

     <arbitrary plantuml code>