code in a note, is it just me?

0 votes
asked May 17, 2021 in Question / help by Geoff Thorpe

I'm seeing a problem, whereby the plantuml server at plantuml.com and the plantuml/plantuml-server container image from dockerhub are doing the right thing, but everything else I have tried is not. That is, I've tried recent ubuntu and debian distros/packages, and I've tried the think/plantuml container image, and they're doing the wrong thing. (Ratonale: I am looking for a scriptable, automatated solution, without running a webserver endpoint for interactive usage.)

Here's example input;

@startuml
note top of something
Some text at the top, whatever.
<code>
    makefile-target: makefile-dependencies...
            makefile-recipe shell commands...
</code>
end note
state something
something : it is what it is
@enduml

In my dev OS, the plantuml tool doesn't format the code snippet in the note, the "<code>" and "</code>" tags are simply in the literal text.

Obviously I can't mark this as a plantuml bug, because it's clearly something that only affects downstream versions. But if anyone can shed light on what's going on, and perhaps a workaround, I'd be most grateful. TIA!

2 Answers

0 votes
answered May 18, 2021 by The-Lu (89,080 points)
 
Best answer

Hello G.

  • What are your issue?

FYI, the <code> functionality come from version 1.2020.18.

If you use older version, a workaround is to use double double quote, for monospaced as:

@startuml
note top of something
Some text at the top, whatever.
""    makefile-target: makefile-dependencies...""
""            makefile-recipe shell commands...""
end note
state something
something : it is what it is
@enduml


If that can help,
Regards,
Th.

commented May 18, 2021 by Geoff Thorpe
Thanks, that nailed it. FWIW, I was under the impression that the <code> tag was working elsewhere, and that this problem was somehow specific to the context (being in a "note", and/or being embedded a couple of layers in, ...). But now that I double-check it seems that I may have confused myself on that point - <code> seems to fail everywhere or succeed everywhere, so yeah, versioning would explain it. The workaround of using double-double quotes gets me past this, so many thanks! :-)
0 votes
answered May 18, 2021 by plantuml (298,440 points)

You should check which version you are using:

@startuml
version
@enduml

Older versions don't support <code> tag.

...