You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-10-23 21:28:56 +03:00
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.
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user