1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-11-09 14:40:55 +03:00

Add admonitions to documentation renderers.

Admonitions call out places where the user should take special care.

Support added for HTML, PDF, Markdown and help text renderers.  XML files have been updated accordingly.

Contributed by Cynthia Shang.
This commit is contained in:
Cynthia Shang
2018-12-30 16:40:20 +02:00
committed by David Steele
parent 3dc327fd05
commit 72865ca33b
15 changed files with 234 additions and 63 deletions

View File

@@ -552,6 +552,14 @@ sub sectionProcess
$iSectionNo++;
}
# Add an admonition (e.g. NOTE, WARNING, etc)
elsif ($oChild->nameGet() eq 'admonition')
{
my $oAdmonition = $oSectionBodyElement->addNew(HTML_DIV, 'admonition');
$oAdmonition->addNew(HTML_DIV, $oChild->paramGet('type'), {strContent => uc($oChild->paramGet('type')) . ": "});
$oAdmonition->addNew(HTML_DIV, $oChild->paramGet('type') . '-text',
{strContent => $self->processText($oChild->textGet())});
}
# Check if the child can be processed by a parent
else
{