1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-09-16 09:06:18 +02:00

Improve section source feature to not require a title or content.

The title will be pulled from the source document.
This commit is contained in:
David Steele
2018-02-16 14:39:42 -05:00
parent 1f62237684
commit 2dc0737e95
3 changed files with 17 additions and 1 deletions

View File

@@ -444,6 +444,15 @@ sub build
{
my $oSource = ${$self->{oManifest}->sourceGet($oNode->paramGet('source'))}{doc};
# Section should not already have title defined, it should come from the source doc
if ($oNode->nodeTest('title'))
{
confess &log(ERROR, "cannot specify title in section that sources another document");
}
# Set title from source doc's title
$oNode->nodeAdd('title')->textSet($oSource->paramGet('title'));
foreach my $oSection ($oSource->nodeList('section'))
{
push(@{${$oNode->{oDoc}}{children}}, $oSection->{oDoc});
@@ -451,6 +460,9 @@ sub build
# Set path prefix to modify all section paths further down
$strPathPrefix = $strPath;
# Remove source so it is not included again later
$oNode->paramSet('source', undef);
}
}
# Build link

View File

@@ -113,7 +113,7 @@
<!ELEMENT section (title?,
((p|list|table|host-add|execute-list|backrest-config|postgres-config|cmd-description|
option-description|code-block|block|section)+))>
option-description|code-block|block|section)*))>
<!ATTLIST section id CDATA #REQUIRED>
<!ATTLIST section keyword CDATA "">
<!ATTLIST section depend CDATA "">

View File

@@ -145,6 +145,10 @@
<p>Add coding standards document.</p>
</release-item>
<release-item>
<p>Improve section source feature to not require a title or content. The title will be pulled from the source document.</p>
</release-item>
<release-item>
<p>Deploy historical documentation to <path>prior</path> rather than the root directory.</p>
</release-item>