]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cd2nroff: do not insist on quoted <> within backticks
authorDaniel Stenberg <daniel@haxx.se>
Tue, 28 Jan 2025 15:51:33 +0000 (16:51 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 28 Jan 2025 16:36:55 +0000 (17:36 +0100)
Ref: #16118
Closes #16121

scripts/cd2nroff

index 86cae213797164bcaea6c117b84f6b0f62368b9b..01b2f1aca6029e0bcd0ef70cf5f74c64499e3069 100755 (executable)
@@ -419,7 +419,12 @@ sub single {
         # *italics*
         $d =~ s/\*(\S.*?)\*/\\fI$1\\fP/g;
 
-        if($d =~ /[^\\][\<\>]/) {
+        my $back = $d;
+
+        # remove all backticked pieces
+        $back =~ s/\`(.*?)\`//g;
+
+        if($back =~ /[^\\][\<\>]/) {
             print STDERR "$f:$line:1:ERROR: un-escaped < or > used\n";
             $errors++;
         }