question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Anchor doesn't resolve" for Antora xref page fragment in nested include

See original GitHub issue

Observed vs. expected behavior

In Antora I use xref to fragments in documents in other modules, for example

xref:sqldb:uspgenerator.GeneratorUspStep.adoc#column-Statement[uspgenerator.GeneratorUspStep.Statement]

They work in Antora, but they are marked by the plugin as error:

image

The link to pages is resolved:

xref:sqldb:uspgenerator.GeneratorUspStep.adoc[]

I am not sure if this is a general issue of if it is related to fact, that I use to deeply nested includes. this is the include structure

partials like sqldb:uspgenerator.GeneratorUspStep.adoc contains the fragments like column-Statement

// tag::AntoraColumnDetails[]

//other columns

[[column-Statement]]
=== Statement

[cols="d,m,m,m,m,d"]
|===
|
|Statement
|nvarchar(max)
|NULL
|
|
|===

//other columns

// end::AntoraColumnDetails[]

partials are addressed by template partial (sqldb:partial$template/master-page-5.adoc) partials containing

ifdef::ExistsProperty--Columns[]

== Column Details

include::partial${docname}.adoc[tag=AntoraColumnDetails]

endif::ExistsProperty--Columns[]

these templates are used in the final page sqldb:uspgenerator.GeneratorUspStep.adoc

include::partial$template/master-page-5.adoc[]

and finally, the page is referenced in another page which is in another repository / in another module:

xref:sqldb:uspgenerator.GeneratorUspStep.adoc#column-Statement[uspgenerator.GeneratorUspStep.Statement]

Steps to reproduce

the repositories are available on github:

I added both repositories as modules in one IntelliJ project

Environment

Plugin Version: 0.32.37

IntelliJ Details: ____

IntelliJ IDEA 2021.1 (Ultimate Edition) Build #IU-211.6693.111, built on April 6, 2021 Licensed to DataHandwerk-toolkit-mssql / Germo Goertz Subscription is active until February 28, 2022. For non-commercial open source development only. Runtime version: 11.0.10+9-b1341.35 amd64 VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 5000M Cores: 4 Non-Bundled Plugins: com.intellij.plugins.vscodekeymap (211.4961.30), org.asciidoctor.intellij.asciidoc (0.32.37) Kotlin: 211-1.4.32-release-IJ6693.72

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ahus1commented, Apr 27, 2021

Thanks for reporting this.

I looked into it, and found that the internal resolver doesn’t resolve the attribute docname in a nested include correctly (see include::partial${docname}.adoc[tag=existing_properties]).

It should either correctly resolve it, or not report a problem when it hasn’t managed to resolve all includes.

I’ll revisit this.

0reactions
aisbergdecommented, May 10, 2021

the issue is solved

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xref Macros and Page Links :: Antora Docs
A fragment is an element ID that links to a section, block, or inline location within the target page. Fragments are also referred...
Read more >
Interdocument Xrefs - Asciidoctor Docs
An xref to another AsciiDoc document (i.e., an interdocument xref) will ... page using the special fragment page=<N> , where <N> is the...
Read more >
Provide fallback link text for self xref (#739) · Issues - Antora
This issue is resolved when the fallback link text for a self xref resolves just like an inbound xref to that page. If...
Read more >
ChangeLog-SLE-15-SP3-GM-SLE-15-SP4-RC1 ... - SUSE
Perl tools have not been included in SUSE since 1.4.1.x - Update to version ... 9.0.1: * Fix a2x crashing on decoding generated...
Read more >
Learn more - RIT Software Engineering OpenBSD Mirror
CVSROOT: /cvs Module name: src Changes by: jsing@cvs.openbsd.org 2008/08/08 10:07:41 Modified files: sys/arch/sgi/include: disklabel.h ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found