mirror of
https://github.com/curl/curl.git
synced 2025-09-12 23:22:42 +03: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 $top = ($line == 1);
|
||||||
my $quote;
|
my $quote;
|
||||||
my $level;
|
my $level;
|
||||||
|
my $blankline;
|
||||||
$start = 0;
|
$start = 0;
|
||||||
|
|
||||||
while(<$fh>) {
|
while(<$fh>) {
|
||||||
my $d = $_;
|
my $d = $_;
|
||||||
$line++;
|
$line++;
|
||||||
|
$blankline = ($d eq "\n");
|
||||||
if($d =~ /^\.(SH|BR|IP|B)/) {
|
if($d =~ /^\.(SH|BR|IP|B)/) {
|
||||||
print STDERR "$f:$line:1:ERROR: nroff instruction in input: \".$1\"\n";
|
print STDERR "$f:$line:1:ERROR: nroff instruction in input: \".$1\"\n";
|
||||||
return 4;
|
return 4;
|
||||||
|
@ -442,6 +444,10 @@ sub render {
|
||||||
$header = 0;
|
$header = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if($blankline) {
|
||||||
|
print STDERR "$f:$line:1:ERROR: trailing blank line\n";
|
||||||
|
exit 3;
|
||||||
|
}
|
||||||
if($tablemode) {
|
if($tablemode) {
|
||||||
# end of table
|
# end of table
|
||||||
push @desc, ".RE\n.IP\n" if($manpage);
|
push @desc, ".RE\n.IP\n" if($manpage);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user