Closed dduportal closed 6 years ago
Thanks for fixing this @pepijnve !
There is the same issue when using !includesub someIncluded.puml!SECTION
from some root.puml
file.
Both someIncluded.puml
and root.puml
reside in the same folder.
Is this bug solved. I also work with !include in plantuml and get errors if I include these files in asciidoc. I can provide an example repository to reproduce these error.
@uniqueck it was fixed to the best of my knowledge. If you have a different reproduction scenario I'm happy to take another look.
@pepijnve So i think the problem is still the same. The base directory for the includes in plantuml files isn't correct. The base directory is related to the asciidoc document from which the plantuml or include macro is started, but it has to be the directory in which the includes plantuml is located. I created an example based on maven. asciidoctor-plantuml-examples / branch issue/asciidoctor/diagram/173
If i can help, let me know.
@uniqueck the include resolution that's done by asciidoctor-diagram only goes one level deep. I'll have to replace that with recursive include logic instead. Might be a good idea anyway since that will enable sending the diagram code off to a remote server.
@pepijnve should we reopen this issue? to watch the state for this issue?
I would suggest we make a new issue for the extend include resolution behaviour.
This is going to be tricky to implement since it requires making a full implementation of PlantUML's preprocessor to do this correctly. If you throw subpart inclusion and conditionals into the mix this starts to look like a huge can of worms...
The alternative is that we pass the correct working directory to the PlantUML server subprocess and simply let PlantUML deal with the preprocessing logic. That's probably preferable, but will not work when you want to use a real diagram server. @Mogztter does asciidoctor-kroki handle this case?
@pepijnve has this been fixed in any way ( re-implement or pass the directory ) ?
For #343 I implemented the logic to delegate all include processing to PlantUML itself. The correct base dir should be getting passed to the preprocessor. That change was included in v2.1.1. If this isn't working for you please open a new issue.
Expected Behavior
plantuml::PATH[]
)The documentation at http://asciidoctor.org/docs/asciidoctor-diagram/#diagram-block-macro says:
Current Behavior
include::
directive is always workingHere is a full example for reproduction: