diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Pod/Html.pm | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/lib/Pod/Html.pm b/lib/Pod/Html.pm index eebc4dbf3b..61152afef3 100644 --- a/lib/Pod/Html.pm +++ b/lib/Pod/Html.pm @@ -1336,23 +1336,25 @@ sub process_pre { my $any = "${ltrs}${gunk}${punc}"; $rest =~ s{ - \b # start at word boundary - ( # begin $1 { - $urls : # need resource and a colon - (?!:) # Ignore File::, among others. - [$any] +? # followed by one or more of any valid - # character, but be conservative and - # take only what you need to.... - ) # end $1 } - (?= # look-ahead non-consumptive assertion - [$punc]* # either 0 or more punctuation - (?: # followed - [^$any] # by a non-url char - | # or - $ # end of the string - ) # - | # or else - $ # then end of the string + \b # start at word boundary + ( # begin $1 { + $urls : # need resource and a colon + (?!:) # Ignore File::, among others. + [$any] +? # followed by one or more of any valid + # character, but be conservative and + # take only what you need to.... + ) # end $1 } + (?= + " > # maybe pre-quoted '<a href="...">' + | # or: + [$punc]* # 0 or more punctuation + (?: # followed + [^$any] # by a non-url char + | # or + $ # end of the string + ) # + | # or else + $ # then end of the string ) }{<a href="$1">$1</a>}igox; |