managen: fix superfluous leading blank line in quoted sections
When a markdown quoted section using 4-space indentation was converted to nroff, managen previously caused a newline to appear after the leading .nf. This fix makes sure that newline is inserted *before* .nf as intended. This is perhaps most notable in the HTML version of rendered manpages if the quoted sections use different colors or similar. Closes #14732
This commit is contained in:
parent
430af3fb59
commit
c280010d8b
@ -374,7 +374,9 @@ sub render {
|
|||||||
elsif($d =~ /^ (.*)/) {
|
elsif($d =~ /^ (.*)/) {
|
||||||
my $word = $1;
|
my $word = $1;
|
||||||
if(!$quote && $manpage) {
|
if(!$quote && $manpage) {
|
||||||
|
push @desc, "\n" if($blankline);
|
||||||
push @desc, ".nf\n";
|
push @desc, ".nf\n";
|
||||||
|
$blankline = 0;
|
||||||
}
|
}
|
||||||
$quote = 1;
|
$quote = 1;
|
||||||
$d = "$word\n";
|
$d = "$word\n";
|
||||||
|
|||||||
@ -222,8 +222,8 @@ sensitive data, including usernames, credentials or secret data content. Be
|
|||||||
aware and be careful when sharing trace logs with others.
|
aware and be careful when sharing trace logs with others.
|
||||||
|
|
||||||
End with a quote
|
End with a quote
|
||||||
.nf
|
|
||||||
|
|
||||||
|
.nf
|
||||||
hello
|
hello
|
||||||
.fi
|
.fi
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user