Subject: | find_extended_links doesn't find absolute links on the start of a line |
Date: | Sun, 01 Jul 2007 09:56:02 +0200 |
To: | bug-Text-WikiFormat [...] rt.cpan.org |
From: | Lukáš Lalinský <lalinsky [...] gmail.com> |
For example if you have text:
-------------
http://example.com
A http://example.com
http://example.com
-------------
only the one that starts with A is converted to a link. The problem is
in find_extended_links in this regex:
$text =~ s!(\s+)(($schemas):\S+)!$1 . $tags->{link}->($2, $opts)!egi
if $opts->{absolute_links};
The (\s+) should be probably changed to (^|\s+), or maybe to:
$text =~ s!(?:^|\b)(($schemas):\S+)!$tags->{link}->($1, $opts)!egi
if $opts->{absolute_links};
-Lukáš
Message body not shown because it is not plain text.