mirror of
https://github.com/curl/curl.git
synced 2025-01-30 14:22:33 +08:00
gen: escape more minus
Detected since it was still hard to search for option names using dashes in the middle in the man page. Closes #11660
This commit is contained in:
parent
00ac47bfaa
commit
439ff2052e
@ -66,13 +66,16 @@ close(INC);
|
||||
sub manpageify {
|
||||
my ($k)=@_;
|
||||
my $l;
|
||||
my $klong = $k;
|
||||
# quote "bare" minuses in the long name
|
||||
$klong =~ s/-/\\-/g;
|
||||
if($optlong{$k} ne "") {
|
||||
# both short + long
|
||||
$l = "\\fI-".$optlong{$k}.", \\-\\-$k\\fP";
|
||||
$l = "\\fI-".$optlong{$k}.", \\-\\-$klong\\fP";
|
||||
}
|
||||
else {
|
||||
# only long
|
||||
$l = "\\fI\\-\\-$k\\fP";
|
||||
$l = "\\fI\\-\\-$klong\\fP";
|
||||
}
|
||||
return $l;
|
||||
}
|
||||
@ -315,6 +318,9 @@ sub single {
|
||||
}
|
||||
close(F);
|
||||
my $opt;
|
||||
|
||||
# escape minus
|
||||
$long =~ s/-/\\-/g;
|
||||
if(defined($short) && $long) {
|
||||
$opt = "-$short, --$long";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user