diff options
author | Brendan O'Dea <bod@debian.org> | 2020-03-15 22:06:42 +1100 |
---|---|---|
committer | Brendan O'Dea <bod@debian.org> | 2020-03-15 22:06:42 +1100 |
commit | 611b98db2ec993fab6fd957fca62beee3b803520 (patch) | |
tree | 6b84c0c63836b16be4d55a3c4f763bae51ca4639 | |
parent | f284bd0d3bcb2893b0e8f5575140f8b0655fe16c (diff) | |
download | help2man-611b98db2ec993fab6fd957fca62beee3b803520.tar.gz |
Update parsing of --version to allow multi-word programs
-rw-r--r-- | THANKS | 1 | ||||
-rw-r--r-- | debian/changelog | 4 | ||||
-rwxr-xr-x | help2man.PL | 6 |
3 files changed, 7 insertions, 4 deletions
@@ -57,6 +57,7 @@ Clytie Siddall <clytie@riverland.net.au> Gavin Smith <gavinsmith0123@gmail.com> Johnny A. Solbu <johnny@solbu.net> Yann Soubeyrand <yann.soubeyrand@gmx.fr> +Jarno Suni <jarno.ilari.suni@gmail.com> SUZUKI Shoji <suzukis@cmpt.phys.tohoku.ac.jp> Reuben Thomas <rrt@sc3d.org> Reuben Thomas <rrt@sc3d.org> diff --git a/debian/changelog b/debian/changelog index 07b48e4..39861cd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,10 @@ help2man (1.47.13) unstable; urgency=medium pkglibdir when nls is disabled. * Remove install_dirs target entirely, add explicit $(MKINSTALLDIRS) before each $(INSTALL_{DATA,PROGRAM}) call. + * Update parsing of --version to allow multi-word programs when + constructing the placeholder NAME paragraph (thanks to Jarno Suni). - -- Brendan O'Dea <bod@debian.org> Sun, 15 Mar 2020 21:56:45 +1100 + -- Brendan O'Dea <bod@debian.org> Sun, 15 Mar 2020 22:05:41 +1100 help2man (1.47.12) unstable; urgency=medium diff --git a/help2man.PL b/help2man.PL index 2fee2bf..ba0864c 100755 --- a/help2man.PL +++ b/help2man.PL @@ -409,14 +409,14 @@ if ($opt_output) ($_, $version_text) = ((split /\n+/, $version_text, 2), ''); -if (/^(\S+) +\(((?:GNU|Free) +[^)]+)\) +(.*)/ or - /^(\S+) +- *((?:GNU|Free) +\S+) +(.*)/) +if (/^(\S+) +\(((?:GNU|Free) +[^)]+)\) +(\S+)$/ or + /^(\S+) +- *((?:GNU|Free) +\S.*) +(\S+)$/) { $program = program_basename $1; $package = $2; $version = $3; } -elsif (/^((?:GNU|Free) +)?(\S+) +(.*)/) +elsif (/^((?:GNU|Free) +)?(\S.*) +(\S+)$/) { $program = program_basename $2; $package = $1 ? "$1$program" : $program; |