diff options
Diffstat (limited to 'man/help2man')
-rwxr-xr-x | man/help2man | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/man/help2man b/man/help2man index bfeb98972..fe786ac22 100755 --- a/man/help2man +++ b/man/help2man @@ -405,16 +405,19 @@ s/\\/\x82/g; # "(?:[\\w-]+ +)?" in the bug reporting pattern is used to indicate an # optional word, so that either "Report bugs" or "Report _program_ bugs" will # be matched. -my $PAT_BUGS = _('Report +(?:[\w-]+ +)?bugs|Email +bug +reports +to'); +my $PAT_BUGS = _('Report +(?:[\w-]+ +)?bugs|' . + 'Email +bug +reports +to|' . + '.* +online +help:'); my $PAT_AUTHOR = _('Written +by'); my $PAT_OPTIONS = _('Options'); my $PAT_ENVIRONMENT = _('Environment'); my $PAT_FILES = _('Files'); my $PAT_EXAMPLES = _('Examples'); my $PAT_FREE_SOFTWARE = _('This +is +free +software'); +my $PAT_SEE_ALSO = _('Full +documentation'); # Start a new paragraph (if required) for these. -s/([^\n])\n($PAT_BUGS|$PAT_AUTHOR) /$1\n\n$2 /og; +s/([^\n])\n($PAT_BUGS|$PAT_AUTHOR|$PAT_SEE_ALSO) /$1\n\n$2 /og; # Convert iso-8859-1 copyright symbol or (c) to nroff # character. @@ -462,6 +465,12 @@ while (length) $sect = _('AUTHOR'); } + elsif (/^($PAT_SEE_ALSO)/o) + { + $sect = _('SEE ALSO'); + $opt_no_info = 1; + } + # Examples, indicated by an indented leading $, % or > are # rendered in a constant width font. if (/^( +)([\$\%>] )\S/) @@ -588,6 +597,17 @@ while (length) # ... s/\n([[:upper:]])/\n.br\n$1/g; } + elsif ($sect eq _('SEE ALSO')) + { + # Handle external references of the form: + # + # GNU <package> online resources: <addr> + # Full documentation at: <addr> + # or available locally via: info ... + # + s/\'/\\(aq/g; # shell quotes for info command + s/\n(.)/\n.br\n$1/g; # separate lines for each item + } } # Check if matched paragraph contains /pat/. |