]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
docs/cmdline-opts/gen.pl: encode leading single and double quotes
authorDaniel Stenberg <daniel@haxx.se>
Tue, 23 Aug 2022 11:42:42 +0000 (13:42 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 23 Aug 2022 11:43:10 +0000 (13:43 +0200)
As "(aq" and "(dq" to prevent them from implying a meaning in the nroff
output. This removes the need for using \& escapes in the .d files'
description parts.

Closes #9352

docs/cmdline-opts/gen.pl

index cbe4540625a3c1f52130fd5adfb8f772abb4783e..01f9cf61a0a457a5838edf9b0a43532e994a3229 100755 (executable)
@@ -113,7 +113,9 @@ sub printdesc {
         $d =~ s/( |\\fI|^)--/$1\\-\\-/g;
         $d =~ s/([ -]|\\fI|^)-/$1\\-/g;
         # handle single quotes first on the line
-        $d =~ s/(\s*)\'/$1\\(aq/;
+        $d =~ s/^(\s*)\'/$1\\(aq/;
+        # handle double quotes first on the line
+        $d =~ s/^(\s*)\"/$1\\(dq/;
         print $d;
     }
     if($exam) {