Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid resolution of files in block macro for non-antora setup #446

Closed
zeldigas opened this issue Mar 24, 2024 · 0 comments · Fixed by #447
Closed

Invalid resolution of files in block macro for non-antora setup #446

zeldigas opened this issue Mar 24, 2024 · 0 comments · Fixed by #447

Comments

@zeldigas
Copy link
Contributor

Setup

.
└── sample
    ├── _assets
    │   └── test.puml
    └── test.adoc

With the following content in test.adoc:

= Test document

Take a look at plantuml feature:

plantuml::_assets/test.puml[]

Problem

I'm converting file with the following command: asciidoctor -r asciidoctor-kroki -D out sample/test.adoc

Expected behavior: _assets/test.puml file is propertly resolved relative to test.adoc, whenever I'm located in parent dir or in sample

Actual behavior: I got error:

sciidoctor: ERROR: test.adoc: line 5: Failed to read plantuml file: _assets/test.puml. No such file or directory @ rb_sysopen - _assets/test.puml.

File is only converted correctly when I place _assets dir, relative to location of workdir where I execute command.

Comparision with asciidoctor-diagram

asciidoctor-diagram module properly resolve file, I dont' get error with the following command: asciidoctor -r asciidoctor-diagram -D out sample/test.adoc

Possible issue

kroki extension uses raw target without resolution:

To compare, asciidoctor-diagram resolves target with normalize_system_path method: https://github.com/asciidoctor/asciidoctor-diagram/blob/9f1f9352bff950df0eae7790a85b5cd85c99c2f0/lib/asciidoctor-diagram/diagram_processor.rb#L396

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant