vscode-plantuml
vscode-plantuml copied to clipboard
Bug: Extension sets filename based on title element, differs from standard plantuml behavior
Extension sets name of output file different from standard plantuml
Plugin generation of simple file yields different file than plantuml - it sets name based on title. This is different behavior from PlantUML. Users of both PlantUML and plugin may need to use a workaround for this difference.
Repro: Execute generation of testfiles below, like so:
- Standard PlantUML: Start a shell in directory with test diagram, execute plantuml, like so
java -jar plantuml.jar abc.puml -v - Plugin: Open file in vs code, execute plantuml via plugin "Export current diagram..."
| Testfile | Standard PlantUML | VS Code output Plugin |
|---|---|---|
File abc.puml: @startuml |
File abc.png, contents: ![]() |
(same) ✅ |
File: abc.puml: @startuml |
File: abc.png, contents: ![]() |
File: titletest.png ❌: Same image contents ✅ |
Expected behavior: plugin generates same output as plantuml. Actual behavior: plugin generates different output than plantuml, see table above: Plugin generation sets name of output file to title, plantuml does not.
From the PlantUML reference guide (e g chapter 1.9 "Page Title, Header and Footer"), the purpose of the title element is to add a title on the generated diagram page.
The title keyword is used to add a title to the page.
This may sound like a nitpick, but in environments where plantuml is already used extensively, and where different toolchains may be employed, it quickly becomes important that the tools behave the same way. 🙂

