nroff-scan.pl: detect double highlights

This commit is contained in:
Daniel Stenberg 2022-11-14 08:38:34 +01:00
parent 4154165e5e
commit 7fcfe0e009
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -64,6 +64,10 @@ sub file {
my $l = $_;
while($l =~ s/\\f(.)([^ ]*)\\f(.)//) {
my ($pre, $str, $post)=($1, $2, $3);
if($str =~ /^\\f[ib]/i) {
print "error: $f:$line: double-highlight\n";
$errors++;
}
if($post ne "P") {
print "error: $f:$line: missing \\fP after $str\n";
$errors++;