diff options
author | Abigail <abigail@abigail.be> | 1998-07-14 23:47:56 -0400 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-15 08:04:24 +0000 |
commit | c16f2413108912acc1226c4ccb6b19c51780a92f (patch) | |
tree | ea1f0ed66b847755b0d1b1dcceb91368ac601aad | |
parent | 53285a483ad40748b7b8acb4d49f634fe77d3170 (diff) | |
download | perl-c16f2413108912acc1226c4ccb6b19c51780a92f.tar.gz |
pod/pod2man.PL Fix use of < inside C<>
Message-Id: <19980715074756.21868.qmail@betelgeuse.wayne.fnx.com>
p4raw-id: //depot/perl@1516
-rw-r--r-- | pod/pod2man.PL | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/pod/pod2man.PL b/pod/pod2man.PL index 26c9764101..8040bf5d63 100644 --- a/pod/pod2man.PL +++ b/pod/pod2man.PL @@ -673,6 +673,9 @@ $indent = 0; $begun = ""; +# Unrolling [^A-Z>]|[A-Z](?!<) gives: // MRE pp 165. +my $nonest = '(?:[^A-Z>]*(?:[A-Z](?!<)[^A-Z>]*)*)'; + while (<>) { if ($cutting) { next unless /^=/; @@ -742,7 +745,7 @@ while (<>) { # first hide the escapes in case we need to # intuit something and get it wrong due to fmting - 1 while s/([A-Z]<[^<>]*>)/noremap($1)/ge; + 1 while s/([A-Z]<$nonest>)/noremap($1)/ge; # func() is a reference to a perl function s{ @@ -799,13 +802,13 @@ while (<>) { while ($maxnest-- && /[A-Z]</) { # can't do C font here - s/([BI])<([^<>]*)>/font($1) . $2 . font('R')/eg; + s/([BI])<($nonest)>/font($1) . $2 . font('R')/eg; # files and filelike refs in italics - s/F<([^<>]*)>/I<$1>/g; + s/F<($nonest)>/I<$1>/g; # no break -- usually we want C<> for this - s/S<([^<>]*)>/nobreak($1)/eg; + s/S<($nonest)>/nobreak($1)/eg; # LREF: a la HREF L<show this text|man/section> s:L<([^|>]+)\|[^>]+>:$1:g; @@ -859,7 +862,7 @@ while (<>) { s/Z<>/\\&/g; # comes last because not subject to reprocessing - s/C<([^<>]*)>/noremap("${CFont_embed}${1}\\fR")/eg; + s/C<($nonest)>/noremap("${CFont_embed}${1}\\fR")/eg; } if (s/^=//) { |