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 11:38:50 +0100
commitc016ae4fbecf0b5e4b31588198faac2020c2bafa (patch)
tree859ee33617d89f3653284ebdb80900cf0c6bc063
parent52826d3b791e0436a2338ed36e38a2f7e1f4e9a6 (diff)
downloadcurl-bagder/gen-references.tar.gz
cmdline-opts/gen.pl: fix option matching to improve referencesbagder/gen-references
Previously it could mistakenly match partial names when there are options that start with the same prefix, leading to the wrong references used.
-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