mirror of
https://github.com/curl/curl.git
synced 2025-02-05 14:30:10 +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 {
|
sub manpageify {
|
||||||
my ($k)=@_;
|
my ($k)=@_;
|
||||||
my $l;
|
my $l;
|
||||||
|
my $klong = $k;
|
||||||
|
# quote "bare" minuses in the long name
|
||||||
|
$klong =~ s/-/\\-/g;
|
||||||
if($optlong{$k} ne "") {
|
if($optlong{$k} ne "") {
|
||||||
# both short + long
|
# both short + long
|
||||||
$l = "\\fI-".$optlong{$k}.", \\-\\-$k\\fP";
|
$l = "\\fI-".$optlong{$k}.", \\-\\-$klong\\fP";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# only long
|
# only long
|
||||||
$l = "\\fI\\-\\-$k\\fP";
|
$l = "\\fI\\-\\-$klong\\fP";
|
||||||
}
|
}
|
||||||
return $l;
|
return $l;
|
||||||
}
|
}
|
||||||
@ -315,6 +318,9 @@ sub single {
|
|||||||
}
|
}
|
||||||
close(F);
|
close(F);
|
||||||
my $opt;
|
my $opt;
|
||||||
|
|
||||||
|
# escape minus
|
||||||
|
$long =~ s/-/\\-/g;
|
||||||
if(defined($short) && $long) {
|
if(defined($short) && $long) {
|
||||||
$opt = "-$short, --$long";
|
$opt = "-$short, --$long";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user