Using non-alpha characters in map's left side

0 votes
asked Feb 21, 2024 in Question / help by Cliff

I'm trying to create diagram that shows how data flows from one end of a process to another, and I'm trying to use maps to do this:

map "Request Headers" as headers {
  X-SENDER-IP => sender's IP
}
map "Internal Dictionary" as dict {
  X-SENDER => sender's IP
}
headers::X-SENDER-IP --> dict::X-SENDER

However, PlantUML is giving me grief when trying to reference those entries using any non-alpha characters. Dash, colon, etc. Underscore works, however. Putting quotes or double quotes around the keys doesn't work either. Trying to add them as Unicode using either the &#XXXX or <U+XXXX> syntax similarly doesn't work.

Is this intentional? Is there a way around this? Can some sort of syntax be added to support this? I would prefer not to have quotes around what is displayed, as I find it unclean.

1 Answer

+1 vote
answered Feb 22, 2024 by The-Lu (89,080 points)
edited Feb 22, 2024 by The-Lu

Hello C,

Here is the right syntax, using double quote on the link definition as:

@startuml
map "Request Headers" as headers {
  X-SENDER-IP => sender's IP
}
map "Internal Dictionary" as dict {
  X-SENDER => sender's IP
}
"headers::X-SENDER-IP" -> "dict::X-SENDER"
@enduml

Enjoy,
Regards,
Th.

...