You've already forked pgbackrest
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:
@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user