I have a very long text to insert in my legend. It can get written on a single line alright, but the readability gets terrible. If I try to use the default escape character at the end of the line ("\") and continue the text on the following, plantuml complains about an error. Writing the string in a separate variable doesn't work either. How can I define a string function parameter in multiple line, in order to avoid a super long line?
The code is as follows:
@startuml
!global $legendText = "Notes"
!global $legendIndex = 0
!unquoted function $insertNote(position, element, text)
!global $legendIndex = $legendIndex + 1
!global $legendText = $legendText + "\n" + $legendIndex + ". " + text
note position of element #white
$legendIndex
end note
!endfunction
component a
component b
a -> b
$insertNote(left, a, "somewhat long text to be inserted here")
$insertNote(right, b, "A REALLY REALLY REALLY REALLY REALLY REALLY REALLY REALLY REALLY REALLY REALLY REALLY LLONG NOTE THAT CANNOT BE WRRITEN IN 2 LINES")
component notes as "$legendText" #white
a -[#hidden]down-> notes
@enduml