From abd8f2b78b647e8fdd5984a5bc240876ea81be78 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 9 Aug 2023 17:58:34 +0200 Subject: [PATCH] gen.pl: replace all single quotes with aq - this prevents man from using a unicode sequence for them - which then allows search to work properly Closes #11645 --- docs/cmdline-opts/gen.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/cmdline-opts/gen.pl b/docs/cmdline-opts/gen.pl index 8542b17130..9855ebadb9 100755 --- a/docs/cmdline-opts/gen.pl +++ b/docs/cmdline-opts/gen.pl @@ -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"; -- 2.47.3