Thanks for the report.
We probably made a confusing choice with "void function" and "return function". (see https://plantuml.com/en/preprocessing ).
I think we should use a fresh new keyword for "void function" (what about "procedure" for example?) to emphasize the difference with "return function" which must return a value.
So you example should be written this way:
@startuml
!function txthighlight($text)
!return "<font color=blue>" + $text + "</font>"
!endfunction
class "SomeClass" as x {
+ Member2: Does txthighlight("blue") and txthighlight("blue") Stuff
}
@enduml
So we are going probably to slightly change the preprocessor:
- !function will have to !return a value
- !procedure (former "void function") won't be able to return anything. They will only output text
I think it will make things more clear to people. What do you thing about it ?