Bug#836831: raw nroff appears on man page
Russ Allbery
rra at debian.org
Tue Sep 6 16:22:04 UTC 2016
Russ Allbery <rra at debian.org> writes:
> Bug in pod2man. This is the fix, although there's still something too
> fragile about the auto-detection of man page references that for some
> reason is still picking up a string that contains a space. I haven't
> figured out that part yet.
> --- a/lib/Pod/Man.pm
> +++ b/lib/Pod/Man.pm
> @@ -514,9 +514,9 @@ sub guesswork {
> # entire warranty disclaimers in man page output into small caps.
> if ($$self{MAGIC_SMALLCAPS}) {
> s{
> - ( ^ | [\s\(\"\'\`\[\{<>] | \\[ ] ) # (1)
> - ( [A-Z] [A-Z] (?: [/A-Z+:\d_\$&] | \\- | [.,\"\s] )* ) # (2)
> - (?= [\s>\}\]\(\)\'\".?!,;] | \\*\(-- | \\[ ] | $ ) # (3)
> + ( ^ | [\s\(\"\'\`\[\{<>] | \\[ ] ) # (1)
> + ( [A-Z] [A-Z] (?: \s? [/A-Z+:\d_\$&] | \\- | [.,\"] )* ) # (2)
> + (?= [\s>\}\]\(\)\'\".?!,;] | \\*\(-- | \\[ ] | $ ) # (3)
> } {
> $1 . '\s-1' . $2 . '\s0'
> }egx;
> (Yes, these regexes are horrible.)
Updated patch that actually passes tests. I'll put out a new release,
hopefully fairly soon.
--- a/lib/Pod/Man.pm
+++ b/lib/Pod/Man.pm
@@ -514,9 +514,9 @@ sub guesswork {
# entire warranty disclaimers in man page output into small caps.
if ($$self{MAGIC_SMALLCAPS}) {
s{
- ( ^ | [\s\(\"\'\`\[\{<>] | \\[ ] ) # (1)
- ( [A-Z] [A-Z] (?: \s? [/A-Z+:\d_\$&] | \\- | [.,\"] )* ) # (2)
- (?= [\s>\}\]\(\)\'\".?!,;] | \\*\(-- | \\[ ] | $ ) # (3)
+ ( ^ | [\s\(\"\'\`\[\{<>] | \\[ ] ) # (1)
+ ( [A-Z] [A-Z] (?: \s? [/A-Z+:\d_\$&] | \\- | \s? [.,\"] )* ) # (2)
+ (?= [\s>\}\]\(\)\'\".?!,;] | \\*\(-- | \\[ ] | $ ) # (3)
} {
$1 . '\s-1' . $2 . '\s0'
}egx;
--
Russ Allbery (rra at debian.org) <http://www.eyrie.org/~eagle/>
More information about the pkg-perl-maintainers
mailing list