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
This commit is contained in:
Daniel Stenberg 2022-08-23 13:42:42 +02:00
parent 91948a9eaf
commit 567693196a
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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) {