]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
nroff-scan.pl: detect double highlights
authorDaniel Stenberg <daniel@haxx.se>
Mon, 14 Nov 2022 07:38:34 +0000 (08:38 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 14 Nov 2022 09:04:57 +0000 (10:04 +0100)
tests/nroff-scan.pl

index 161721ffa11c39c9d17eea18582bdeaeef21221e..c310256a0abcdd3c6d826a1bde17931e4df5eb47 100755 (executable)
@@ -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++;