mirror of
https://github.com/curl/curl.git
synced 2026-08-03 17:30:30 +03:00
gen.pl: quote "bare" minuses in the nroff curl.1
Reported-by: Alejandro Colomar Fixes #6698 Closes #6722
This commit is contained in:
parent
419f0f5534
commit
f83d4ea56e
2 changed files with 19 additions and 5 deletions
|
|
@ -70,6 +70,9 @@ sub printdesc {
|
|||
$d =~ s/--$k([^a-z0-9_-])/$l$1/;
|
||||
}
|
||||
}
|
||||
# quote "bare" minuses in the output
|
||||
$d =~ s/( |\\fI|^)--/$1\\-\\-/g;
|
||||
$d =~ s/([ -]|\\fI|^)-/$1\\-/g;
|
||||
print $d;
|
||||
}
|
||||
}
|
||||
|
|
@ -203,6 +206,9 @@ sub single {
|
|||
$opt .= " $arg";
|
||||
}
|
||||
|
||||
# quote "bare" minuses in opt
|
||||
$opt =~ s/( |^)--/$1\\-\\-/g;
|
||||
$opt =~ s/( |^)-/$1\\-/g;
|
||||
if($standalone) {
|
||||
print ".TH curl 1 \"30 Nov 2016\" \"curl 7.52.0\" \"curl manual\"\n";
|
||||
print ".SH OPTION\n";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue