From fde0925214c41300b50c8136d35031615ecaa6bb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 19 Jan 2022 11:38:50 +0100 Subject: [PATCH] cmdline-opts/gen.pl: fix option matching to improve references Previously it could mistakenly match partial names when there are options that start with the same prefix, leading to the wrong references used. Closes #8299 --- docs/cmdline-opts/gen.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cmdline-opts/gen.pl b/docs/cmdline-opts/gen.pl index a7d013ae8b..296096a04a 100755 --- a/docs/cmdline-opts/gen.pl +++ b/docs/cmdline-opts/gen.pl @@ -104,7 +104,7 @@ sub printdesc { if($d =~ /^[^ ]/) { for my $k (keys %optlong) { my $l = manpageify($k); - $d =~ s/--$k([^a-z0-9_-])/$l$1/; + $d =~ s/--$k([^a-z0-9_-])(\W)/$l$1$2/; } } # quote "bare" minuses in the output -- 2.47.3