doc: help2man: recognise option description with smaller indent

* man/help2man: Allow for a smaller indented option description.
This smaller indentation is present in timeout --help output,
so now the line spacing in timeout.1 is more consistent.
Also having the description on a separate line with
a smaller indentation, is a more general way to present
option descriptions (and what the man page formatting uses already).
We'll be changing many utilities, especially with longer multi-line
descriptions to this new format.
This commit is contained in:
Pádraig Brady committed 2026-01-21 13:51:39 +00:00
1 parent 5a21df35b0
commit d06a666429
1 file changed
+1 -1
+1 -1
View File
@@ -534,7 +534,7 @@ while (length)
my $content = '';
# Option with description.
if (s/^( {1,10}([+-]\S.*?))(?:( +(?!-))|\n( {20,}))(\S.*)\n//)
if (s/^( {1,10}([+-]\S.*?))(?:( +(?!-))|\n( {7,}))(\S.*)\n//)
{
$matched .= $& if %append_match;
$indent = set_indent length ($4 || "$1$3");