From 7fcfe0e0091999a8189449ee40a20135619c44da Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 14 Nov 2022 08:38:34 +0100 Subject: [PATCH] nroff-scan.pl: detect double highlights --- tests/nroff-scan.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/nroff-scan.pl b/tests/nroff-scan.pl index 161721ffa1..c310256a0a 100755 --- a/tests/nroff-scan.pl +++ b/tests/nroff-scan.pl @@ -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++;