confluence-publisher
confluence-publisher copied to clipboard
Cross page links with anchors are rendered incorrectly
If you have a cross page link with an anchor <guideline-rest/hints-on-the-implementation-of-rest-services.adoc#title-section,Hints on the Implementation of REST services>>
then it will not be a correct link.
From what I could tell inline_anchor.html.slim
uses cross_page_xref?
in helpers.rb
, which uses str.end_with? ".html"
. This check is not correct for this case, as the string will be: guideline-rest/hints-on-the-implementation-of-rest-services.html#title-section
.
I've changed it to
def cross_page_xref? str
str.include? ".html"
end
And it now correctly renders a link to the other page, it does seem to omit the anchor tag, but at least the link is not totally broken anymore.
If we omit the anchor for the cross link <<guideline-rest/hints-on-the-implementation-of-rest-services.adoc,Hints on the Implementation of REST services>>
, then asciidoctor complains.
asciidoctor: INFO: possible invalid reference: guideline-rest/hints-on-the-implementation-of-rest-services.adoc
Fixing this issue would be very helpful.