]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
gen.pl: replace all single quotes with aq
authorDaniel Stenberg <daniel@haxx.se>
Wed, 9 Aug 2023 15:58:34 +0000 (17:58 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 9 Aug 2023 15:58:35 +0000 (17:58 +0200)
- this prevents man from using a unicode sequence for them
- which then allows search to work properly

Closes #11645

docs/cmdline-opts/gen.pl

index 8542b171309d86d182b378b155c43e5838996b27..9855ebadb94e8ad04cb2e95704a4c4bc7552949c 100755 (executable)
@@ -118,8 +118,8 @@ sub printdesc {
         }
         # quote "bare" minuses in the output
         $d =~ s/([^\\])-/$1\\-/g;
-        # handle single quotes first on the line
-        $d =~ s/^(\s*)\'/$1\\(aq/;
+        # replace single quotes
+        $d =~ s/\'/\\(aq/g;
         # handle double quotes first on the line
         $d =~ s/^(\s*)\"/$1\\(dq/;
         print $d;
@@ -450,6 +450,7 @@ sub single {
         foreach my $e (@examples) {
             $e =~ s!\$URL!https://example.com!g;
             $e =~ s/\-/\\-/g;
+            $e =~ s/\'/\\(aq/g;
             print " curl $e\n";
         }
         print ".fi\n";