mirror of
https://github.com/curl/curl.git
synced 2025-01-24 14:15:18 +08:00
managen: error on trailing blank lines in input files
Ref: #14014 Closes #14015
This commit is contained in:
parent
2d5aea9c93
commit
d14a53eea7
@ -270,11 +270,13 @@ sub render {
|
||||
my $top = ($line == 1);
|
||||
my $quote;
|
||||
my $level;
|
||||
my $blankline;
|
||||
$start = 0;
|
||||
|
||||
while(<$fh>) {
|
||||
my $d = $_;
|
||||
$line++;
|
||||
$blankline = ($d eq "\n");
|
||||
if($d =~ /^\.(SH|BR|IP|B)/) {
|
||||
print STDERR "$f:$line:1:ERROR: nroff instruction in input: \".$1\"\n";
|
||||
return 4;
|
||||
@ -442,6 +444,10 @@ sub render {
|
||||
$header = 0;
|
||||
|
||||
}
|
||||
if($blankline) {
|
||||
print STDERR "$f:$line:1:ERROR: trailing blank line\n";
|
||||
exit 3;
|
||||
}
|
||||
if($tablemode) {
|
||||
# end of table
|
||||
push @desc, ".RE\n.IP\n" if($manpage);
|
||||
|
Loading…
Reference in New Issue
Block a user