From: Daniel Stenberg Date: Tue, 23 Aug 2022 11:42:42 +0000 (+0200) Subject: docs/cmdline-opts/gen.pl: encode leading single and double quotes X-Git-Tag: curl-7_85_0~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=567693196a6f1d786d01dba39a11abc1cd2be099;p=thirdparty%2Fcurl.git docs/cmdline-opts/gen.pl: encode leading single and double quotes 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 --- diff --git a/docs/cmdline-opts/gen.pl b/docs/cmdline-opts/gen.pl index cbe4540625..01f9cf61a0 100755 --- a/docs/cmdline-opts/gen.pl +++ b/docs/cmdline-opts/gen.pl @@ -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) {