Resolves: in a preview, when a document xref's another document and then that document include::'s the first document
The changes made:
src/asciidocEngine.ts
added the intrinsic attributes that were missing. These are missing because they are only intrinsically assigned when asciidoctor processes a file but we process with the input as a string. Reference the asciidoctor documentation, notice that the modifiable column calls out that these are only assignable via the API in this situation: https://github.com/asciidoctor/asciidoctor-vscode/issues/425#issuecomment-2071267886
Now that docname is set, the macros substitution is properly able to handle the xref macros when they are referencing the same document that is include::'ing them
src/test/asciidoctorWebViewConverter.test.ts
refactored the two types of conversions to utilize a new function that creates the converter options. This applies the same intrinsic attributes solution
also, this sets the safe mode to UNSAFE as it is in the preview code, this way includes:: are actually resolved
Added two tests: 1) test that the included file is able to xref into the parent file, 2) new test to make sure an included file can xref a separate included file
Refer to my comment made on the issue for details about the issue and resolution: https://github.com/asciidoctor/asciidoctor-vscode/issues/425#issuecomment-2071267886
Resolves: in a preview, when a document xref's another document and then that document
include::
's the first documentThe changes made:
docname
is set, themacros
substitution is properly able to handle the xref macros when they are referencing the same document that isinclude::
'ing themUNSAFE
as it is in the preview code, this wayincludes::
are actually resolvedresolves #425