summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2022-01-19 11:38:50 +0100
committerDaniel Stenberg <daniel@haxx.se>2022-01-19 13:29:28 +0100
commitfde0925214c41300b50c8136d35031615ecaa6bb (patch)
tree8bed620d156267184a71de8ace3a2f8a0df715fd
parent0c2694f22f73abbd51a1b4bb6720acaacbc8ebd5 (diff)
downloadcurl-fde0925214c41300b50c8136d35031615ecaa6bb.tar.gz
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
-rwxr-xr-xdocs/cmdline-opts/gen.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/cmdline-opts/gen.pl b/docs/cmdline-opts/gen.pl
index a7d013ae8..296096a04 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