managen: insert final .fi for files ending with a quote

When an individual file ended with a quote (typically an example), the
render function would return without ending the quote correctly with a
".fi" (fill in) in the manpage output.

This made the additional text provided below to render wrongly.

Closes #14048
This commit is contained in:
Daniel Stenberg 2024-06-28 09:01:08 +02:00
parent ad7a20d506
commit e63e0d60b5
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 19 additions and 9 deletions

View file

@ -454,6 +454,10 @@ sub render {
print STDERR "$f:$line:1:ERROR: trailing blank line\n";
exit 3;
}
if($quote) {
# don't leave the quote "hanging"
push @desc, ".fi\n" if($manpage);
}
if($tablemode) {
# end of table
push @desc, ".RE\n.IP\n" if($manpage);
@ -673,9 +677,6 @@ sub single {
}
}
printdesc($manpage, 2, (@leading, @desc));
undef @desc;
my @extra;
if($multi eq "single") {
push @extra, "${pre}If --$long is provided several times, the last set ".
@ -706,7 +707,7 @@ sub single {
}
elsif($multi eq "per-URL") {
push @extra,
"${pre}--$long is associated with a single URL. Use it once per URL\n".
"${pre}--$long is associated with a single URL. Use it once per URL ".
"when you use several URLs in a command line.\n";
}
else {
@ -714,7 +715,8 @@ sub single {
return 2;
}
printdesc($manpage, 2, @extra);
printdesc($manpage, 2, (@leading, @desc, @extra));
undef @desc;
my @foot;