How to prevent that "\t" is in a legend interpreted as <tab>

0 votes
asked Mar 25, 2022 in Bug by jens.fudickar (400 points)
recategorized Mar 25, 2022 by jens.fudickar

How to prevent that "\t" is in a legend interpreted as <tab>?

I want to write the filename including directory into a legend. And this can have a \t :-)

@startuml
legend
| <b>json2puml | <b>v1.1.5.15\n |
| Generated at | 25.03.2022 11:26:41 |
| Input List File | data\\ttspec\\inputlist.json |
| Definition Option | default |
end legend
@enduml

PlantUML Diagram

2 Answers

0 votes
answered Mar 25, 2022 by The-Lu (73,540 points)

A possible workaround is using `/` instead, as:

0 votes
answered Mar 25, 2022 by Martin (9,120 points)
edited Mar 25, 2022 by Martin

It does seem to be a bug, as you would expect \\t to work, but it doesn't.

Here's a workaround using a "zero-width space" unicode character:

@startuml
legend
| <b>json2puml | <b>v1.1.5.15\n |
| Generated at | 25.03.2022 11:26:41 |
| Input List File | data\\<U+200B>ttspec\\inputlist.json |
| Definition Option | default |
end legend
@enduml

commented Mar 25, 2022 by jens.fudickar (400 points)
Nice trick with the unicode char, I will give it a try.
commented Mar 25, 2022 by jens.fudickar (400 points)
Oh by the way, same problem is in header and footer.
commented Nov 21, 2023 by vp
the same problem is in notes as well
...