Hello,
As usually, there are some tricks with the backslash...
First, as you have figurated it out, you have to double it.
Second, there is a not-very-documented feature in PlantUML that allows to split a line
into several lines, putting a \ at the end.
Example:
@startuml
Alice -> Bob : this comment \
is on a line
@enduml
http://www.plantuml.com:80/plantuml/img/Syp9J4vLqBLJSCfFKh1IACd8B5P8pi_DJSqhKOZX0dBoynGI5N8oyr81
Unfortunalty, this is clashing with "set namespaceSeparator \\".
A possible turn-around is to put a white space after the \\: "set namespaceSeparator \\ "
This would prevent the line to be merged.
So finally, you can use:
@startuml
'put a whitespace after the \\ in the next line, otherwhise the line will be merged with the next one
set namespaceSeparator \\
class X1\\X2\\foo {
some info
}
@enduml
http://www.plantuml.com/plantuml/img/HOqn3W8X54HxJZ6TZOrUnMOBckywAoJ09_3DcXZlBajZDsycatUgBuEWLra9sOmD5WZl4SjCXMz3YeLdwE2sXzWvbwF47bF2dSXiJpu6MlZVjD1r6efaJiEDLPgOjaFWrYIzOxbulroztrJnSK3Np27Vr7r_
We will fix the whitespace issue in the next release : lines ending with 2 backslashes will not be merged.
Regards, and happy UML