You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-05 00:28:52 +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:
@ -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();
|
||||
}
|
||||
}
|
||||
#
|
||||
|
Reference in New Issue
Block a user