Closed leonardopavanrocha closed 6 months ago
My approach was to simply replace it for an empty string for now.
@mojavelinux do you think it will cause any issue?
For the purpose of the preview, I don't think it would be an issue. For the purpose of rendering a single component version, the value doesn't actually matter. It's when there are inbound references to resources in that component version from another that it becomes an issue.
As I often say, how does the IntelliJ plugin handle this situation?
The Intellij plugin does not use Antora (i.e., it does not use the ContentCatalog.addFile
method) so it does not have this "issue". I guess one use case where it won't work is when the user is using an xref that includes a specific version?
Hey guys! Thank you for merging this and thanks for the guidance on this topic @ggrossetie @mojavelinux. Let me know if I can help with anything else 🙂
The Intellij plugin does not use Antora (i.e., it does not use the ContentCatalog.addFile method) so it does not have this "issue".
It may not use Antora directly, but surely it handles the situation when the version is set to true and references are used.
Resolves https://github.com/asciidoctor/asciidoctor-vscode/issues/829
Currently if our antora.yml is using
version: true
, it is not possible to render a preview of the asciidoc file as version is expected to be a string and it fails with the following trace:When antora is using
version: true
, it means that it will use the refname (branch/tags). Ideally the fix would use the refname, but I am not sure if we can access that from within the extension. I would appreciate any input on that. My approach was to simply replace it for an empty string for now.