From 4460fa95e47097ba5b4401e9a7e379f33a00943c Mon Sep 17 00:00:00 2001 From: Yorhel Date: Thu, 16 Dec 2010 16:24:29 +0100 Subject: VNDBUtil::bb2html(): Fixed bug when the string starts with a VNDBID --- lib/VNDBUtil.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/VNDBUtil.pm') diff --git a/lib/VNDBUtil.pm b/lib/VNDBUtil.pm index 1d4fd003..f28ff7f7 100644 --- a/lib/VNDBUtil.pm +++ b/lib/VNDBUtil.pm @@ -114,7 +114,7 @@ sub bb2html { next; } # id - if(($id || $exid) && substr($raw, $last-1-length($match), 1) !~ /[\w]/ && substr($raw, $last, 1) !~ /[\w]/) { + if(($id || $exid) && (!$result || substr($raw, $last-1-length($match), 1) !~ /[\w]/) && substr($raw, $last, 1) !~ /[\w]/) { $length += length $match; last if $maxlength && $length > $maxlength; $result .= sprintf '%1$s', $match; -- cgit v1.2.3