Please provide a way to escape "@startuml" in notes

0 votes
asked Sep 26, 2015 in Closed feature request by Fuhrmanator (1,680 points)

I was trying to explain how to use PlantUML with GitHub, and I ran into a problem with the @startuml and @enduml inside a note (the text is ignored).

Example of ignored text:

note as n1
""@startuml""
""//your plantuml source//""
""...""
""@enduml""
end note

Please provide a way to escape "@startuml" in notes.

1 Answer

0 votes
answered Sep 27, 2015 by plantuml (279,640 points)
selected Sep 29, 2015 by Fuhrmanator
 
Best answer

There is a workaround with a zero-width-space https://en.wikipedia.org/wiki/Zero-width_space#Encoding

There's one between the '@' and 's' in the following: "@​startuml"


In last beta https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

You can use tild (~) to escape the @startuml:

@startuml
note as n1
""~@startuml""
""//your plantuml source//""
""...""
""@enduml""
end note
@enduml

This has not been very tested, so feeback is welcome!

commented Aug 16, 2021 by Mario
This is great! Thank you!
...