asciidoctor / asciidoctor-vscode

AsciiDoc support for Visual Studio Code using Asciidoctor
Other
326 stars 98 forks source link

plantUML diagrams included with makro syntax fail to render in the preview when they include further files #361

Closed jacques-ro closed 3 years ago

jacques-ro commented 3 years ago

Environment

image

AsciiDoc Plugin Version: 2.8.3

Kroki.io is used for diagram rendering (use_kroki is enabled)

Example for Reproduction

asciidoc-issue-demo.zip

Description

Hi,

as you can see in the example, a plantUML diagram included using the plantuml:: syntax does not render in the preview if it includes further plantuml files relative to itself. According to the docs this is syntactically correct. Also, exporting the example to HTML using the docToolchain works fine, so it seems to be good in general. The export is also in the zip file.

The preview of the plantUML plugin in VS Code can also display both diagrams.

However, the asciidoc preview looks as follows, reporting an error that it cannot find the 2nd level include:

image

Observed behavior (1)

includes in plantuml files cause errors in the rendering process

Expected bevavior (1)

includes in plantuml files are processed correctly

I also want to report that there is another issue, likely in conjunction with the issue above:

Observed behavior (2)

When saving changes in a plantUML file while the asciidoc preview is open, the preview shows errors for all files until it's closed and re-opened

Expected behavior (2)

Saving changes in an included plantUML file does not break the preview

Kind regards Jacques

anb0s commented 3 years ago

I'm also using !include pattern and it works with own and public kroki-server. This was added in asciidoc-kroki v0.9.1

Please try the latest asciidoctor-vscode version...

anb0s commented 3 years ago

I've just tried and think it should work with version asciidoc-kroki v0.12.0 because of fixed Resolve relative PlantUML includes from the diagram directory (not from the Asciidoctor base directory) that should be integrated first wth PR #390 :)

jacques-ro commented 3 years ago

Hi @anb0s,

sorry for my late response. I will test myself using the newer version when I have time. But that may not be too soon. I moved away from plantuml towards draw.io. While I like the idea of having diagrams as code, I prefer control over placement and visual details that I get from drawing them myself.

Thanks for your effort.

ggrossetie commented 3 years ago

This issue should be resolved now. @jacques-ro Feel free to reopen if that's not the case.