help2man: allow line breaks in long lists of options

* tools/help2man: Add \: after | when listing optional arguments.
This should fix a lintian warning about unbreakable long line.
This commit is contained in:
Alexandre Duret-Lutz 2020-07-29 21:28:01 +02:00
parent a8db30d676
commit 672e6248b8

View file

@ -750,7 +750,8 @@ sub get_option_value
} }
# Convert option dashes to \- to stop nroff from hyphenating 'em, and # Convert option dashes to \- to stop nroff from hyphenating 'em, and
# embolden. Option arguments get italicised. # embolden. Option arguments get italicized. \: in front of | allow
# linebreaks.
sub convert_option sub convert_option
{ {
local $_ = '\fB' . shift; local $_ = '\fB' . shift;
@ -758,7 +759,7 @@ sub convert_option
s/-/\x83/g; s/-/\x83/g;
if (s/\[=(.*)\]$/\\fR[=\\fI$1\\fR]/) if (s/\[=(.*)\]$/\\fR[=\\fI$1\\fR]/)
{ {
s/\|/\\fR|\\fI/g; s/\|/\\fR|\\:\\fI/g;
} }
else else
{ {