Detected since it was still hard to search for option names using dashes
in the middle in the man page.
Closes #11660
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;
}
}
close(F);
my $opt;
+
+ # escape minus
+ $long =~ s/-/\\-/g;
if(defined($short) && $long) {
$opt = "-$short, --$long";
}