From: Jari Aalto Date: Sat, 17 Mar 2007 11:11:17 +0000 (+0300) Subject: Re: [perl #41691] [PATCH] v5.8.8 pod2html -- Convert RFC links to point ot IETF pages X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5d05e4606eee124eec06ad140a831c75fca95783;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/lib/Pod/Html.pm b/lib/Pod/Html.pm index 8dd0415..9955d34 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$2}gx; + {$1}gx; $text; }