mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-06 03:53:59 +02:00
Restore some linefeed rendering behavior from before def7d513
.
The new rendering behavior is correct in normal cases, but for the pre-rendered HTML blocks in the command and configuration references it causes a lot of churn. This would be OK if the new HTML was diff-able, but it is not. Go back to the old behavior of using br tags for this case to reduce churn until a more permanent solution is found.
This commit is contained in:
parent
c32e000ab9
commit
1336657326
@ -118,7 +118,7 @@ my $oRenderTag =
|
||||
'quote' => ['<q>', '</q>'],
|
||||
'b' => ['<b>', '</b>'],
|
||||
'i' => ['<i>', '</i>'],
|
||||
'p' => ['<div class="section-body-text">', '</div>'],
|
||||
'p' => ['', ''],
|
||||
# 'bi' => ['<i><b>', '</b></i>'],
|
||||
'list' => ['<ul class="list-unordered">', '</ul>'],
|
||||
'list-item' => ['<li class="list-unordered">', '</li>'],
|
||||
@ -986,6 +986,7 @@ sub processText
|
||||
|
||||
my $strType = $self->{strType};
|
||||
my $strBuffer = '';
|
||||
my $strLastTag = 'body';
|
||||
|
||||
foreach my $oNode ($oText->nodeList(undef, false))
|
||||
{
|
||||
@ -1004,7 +1005,22 @@ sub processText
|
||||
}
|
||||
else
|
||||
{
|
||||
# Add br tags to separate paragraphs and linefeeds to make the output more diffable. This is needed because of the hacky
|
||||
# way config text is being rendered in the final document, i.e. by passing rendered HTML into divs rather than XML to be
|
||||
# rendered at that time.
|
||||
if ($strLastTag eq 'p' && $strType eq 'html')
|
||||
{
|
||||
$strBuffer .= "<br/>\n";
|
||||
|
||||
if ($oNode->nameGet() eq 'p')
|
||||
{
|
||||
$strBuffer .= "<br/>\n";
|
||||
}
|
||||
}
|
||||
|
||||
$strBuffer .= $self->processTag($oNode);
|
||||
|
||||
$strLastTag = $oNode->nameGet();
|
||||
}
|
||||
}
|
||||
#
|
||||
|
@ -625,7 +625,7 @@ sub backrestConfigProcess
|
||||
# {strContent => "${strFile}:"});
|
||||
|
||||
# Convert linefeeds to br tags
|
||||
$strConfig =~ s/\n/<\/br>/g;
|
||||
$strConfig =~ s/\n/<br\/>\n/g;
|
||||
|
||||
$oConfigBodyElement->
|
||||
addNew(HTML_DIV, "config-body-output",
|
||||
@ -685,7 +685,7 @@ sub postgresConfigProcess
|
||||
# {strContent => "append to ${strFile}:"});
|
||||
|
||||
# Convert linefeeds to br tags
|
||||
$strConfig =~ s/\n/<\/br>/g;
|
||||
$strConfig =~ s/\n/<br\/>\n/g;
|
||||
|
||||
$oConfigBodyElement->
|
||||
addNew(HTML_DIV, "config-body-output",
|
||||
|
@ -200,6 +200,7 @@
|
||||
<commit subject="Add missing paragraph tag in user guide."/>
|
||||
<commit subject="Add br tags for HTML documentation rendering missed in def7d513."/>
|
||||
<commit subject="Add missing paragraph tags in coding standards."/>
|
||||
<commit subject="Restore some linefeed rendering behavior from before def7d513."/>
|
||||
|
||||
<release-item-contributor-list>
|
||||
<release-item-contributor id="david.steele"/>
|
||||
|
Loading…
Reference in New Issue
Block a user