theia-ide / theia-asciidoc-extension

Asciidoctor extension for Theia
2 stars 6 forks source link

includes do not work #4

Closed rdmueller closed 5 years ago

rdmueller commented 5 years ago

great work! The preview already looks great!

while testing the extension, I noticed two things with includes:

include::test.adoc[]

1) this throws an error and doesn't render the document at all. Other implementations just render the error instead of the included file.

The error is

asciidoctor: ERROR: contents.adoc: line xxx: include file not found: /tmp/asciidoc-hhY0dg/test.adoc

2) as you can see, it seem that the error is because the extension tries to find the document to be included in the /tmp folder. This might be because include files are document relative... so if you render the main document in /tmp, it will also search the included files there.

If I rewrite the include from above as

include::/workspace/theia-asciidoc-extension/test.adoc[]

everything works fine

svenefftinge commented 5 years ago

Fixed in master

rdmueller commented 5 years ago

great, thanx!