1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-30 19:23:04 +03:00

Move info command text to the reference and link to user guide.

This means the same text will appear in both places, which should make it easier to find.

Also update the link code to allow both page and section to be specified rather than only one or the other.
This commit is contained in:
David Steele
2020-09-25 11:26:27 -04:00
committed by GitHub
parent 31962377d9
commit 597739fafe
4 changed files with 45 additions and 18 deletions

View File

@ -729,6 +729,13 @@ sub processTag
if (!defined($strUrl))
{
my $strPage = $self->variableReplace($oTag->paramGet('page', false));
my $strSection = $oTag->paramGet('section', false);
# If a page/section link points to the current page then remove the page portion
if (defined($strPage) && defined($strSection) && $strPage eq $self->{strRenderOutKey})
{
undef($strPage);
}
# If this is a page URL
if (defined($strPage))
@ -741,11 +748,20 @@ sub processTag
# Else point locally
else
{
if ($strType eq 'html' || $strType eq 'markdown')
if ($strType eq 'html')
{
$strUrl =
$oTag->paramGet('page', false) . '.' .
($strType eq 'html' ? $strType : '.md');
$strUrl = "${strPage}.html". (defined($strSection) ? '#' . substr($strSection, 1) : '');
}
elsif ($strType eq 'markdown')
{
if (defined($strSection))
{
confess &log(
ERROR,
"page and section links not supported for type ${strType}, value '" . $oTag->valueGet() . "'");
}
$strUrl = "${strPage}.md";
}
else
{