pgbackrest.git / summary / log / commit / refs
commit d24d1edfbd46936f78177aec48ddf30ecb07da2f
Author: David Steele <david@pgbackrest.org>
Date: Sat Jul 18 11:36:19 2026 +0000
Resolve markdown cross-page section links to the website.
A markdown link that specified both a page and a section failed to render when the target page was itself rendered as markdown, because markdown cannot reliably anchor into another generated file.
Resolve these links to the website URL with the section anchor, matching how links to pages that are not rendered as markdown already behave, so a markdown document can link to a section of another.
doc/lib/pgBackRestDoc/Common/DocRender.pm | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/doc/lib/pgBackRestDoc/Common/DocRender.pm b/doc/lib/pgBackRestDoc/Common/DocRender.pm
index 5cb0bf486..939b3dc9e 100644
--- a/doc/lib/pgBackRestDoc/Common/DocRender.pm
+++ b/doc/lib/pgBackRestDoc/Common/DocRender.pm
@@ -652,14 +652,15 @@ sub processTag
}
elsif ($strType eq 'markdown')
{
+ # Markdown does not support cross-page section anchors so point at the website
if (defined($strSection))
{
- confess &log(
- ERROR,
- "page and section links not supported for type ${strType}, value '" . $oTag->valueGet() . "'");
+ $strUrl = '{[backrest-url-base]}/' . $oTag->paramGet('page') . '.html#' . substr($strSection, 1);
+ }
+ else
+ {
+ $strUrl = "${strPage}.md";
}
-
- $strUrl = "${strPage}.md";
}
else
{
[parent: 42db536fa7f3]