managen: fix blank line detection

Follow-up to d14a53eea7 which ruined the output somewhat.

Closes #14017
This commit is contained in:
Daniel Stenberg 2024-06-25 16:28:33 +02:00
parent 473ec8a05d
commit c1845dc0e2
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -276,13 +276,13 @@ sub render {
my $top = ($line == 1);
my $quote;
my $level;
my $blankline;
my $finalblank;
$start = 0;
while(<$fh>) {
my $d = $_;
$line++;
$blankline = ($d eq "\n");
$finalblank = ($d eq "\n");
if($d =~ /^\.(SH|BR|IP|B)/) {
print STDERR "$f:$line:1:ERROR: nroff instruction in input: \".$1\"\n";
return 4;
@ -450,7 +450,7 @@ sub render {
$header = 0;
}
if($blankline) {
if($finalblank) {
print STDERR "$f:$line:1:ERROR: trailing blank line\n";
exit 3;
}