diff options
author | Jari Aalto <jari.aalto@poboxes.com> | 2007-03-17 14:11:17 +0300 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-03-19 09:34:32 +0000 |
commit | 5d05e4606eee124eec06ad140a831c75fca95783 (patch) | |
tree | 8629fd8078694e1e42d38c14d63f4a5f6cd1e72f /lib/Pod | |
parent | edc977ff4b32076d5328683e717dd853f7e9204f (diff) | |
download | perl-5d05e4606eee124eec06ad140a831c75fca95783.tar.gz |
Re: [perl #41691] [PATCH] v5.8.8 pod2html -- Convert RFC links to point ot IETF pages
Message-ID: <87k5xg9tne.fsf@w2kpicasso.cante.net>
p4raw-id: //depot/perl@30631
Diffstat (limited to 'lib/Pod')
-rw-r--r-- | lib/Pod/Html.pm | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/Pod/Html.pm b/lib/Pod/Html.pm index 8dd04158a7..9955d3463f 100644 --- a/lib/Pod/Html.pm +++ b/lib/Pod/Html.pm @@ -3,7 +3,7 @@ use strict; require Exporter; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); -$VERSION = 1.07; +$VERSION = 1.08; @ISA = qw(Exporter); @EXPORT = qw(pod2html htmlify); @EXPORT_OK = qw(anchorify); @@ -1508,17 +1508,15 @@ sub process_text { sub process_text_rfc_links { my $text = shift; - # For every "RFCnnnn" or "RFC nnn" link it to the authoritative - # source. Do not use (i) option here. Require RFC to be written in + # For every "RFCnnnn" or "RFC nnn", link it to the authoritative + # ource. Do not use the /i modifier here. Require "RFC" to be written in # in capital letters. $text =~ s{ - (?=^\S) # positive lookahead, make sure this is "text" paragraph - (.*?) # Grab leading text - (?<=[^<>]) # Make sure this is not an URL already - (RFC\s*(\d{1,5}))(?=\s) # max 5 digits + (?<=[^<>[:alpha:]]) # Make sure this is not an URL already + (RFC\s*([0-9]{1,5}))(?![0-9]) # max 5 digits } - {$1<a href="http://www.ietf.org/rfc/rfc$3.txt">$2</a>}gx; + {<a href="http://www.ietf.org/rfc/rfc$3.txt" class="rfc">$1</a>}gx; $text; } |