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
This commit is contained in:
Daniel Stenberg 2022-01-19 11:38:50 +01:00
parent 0c2694f22f
commit fde0925214
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

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