summaryrefslogtreecommitdiff
path: root/lib/VNDBUtil.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-12-16 16:24:29 +0100
committerYorhel <git@yorhel.nl>2010-12-16 16:24:29 +0100
commit4460fa95e47097ba5b4401e9a7e379f33a00943c (patch)
treefd0127758d4b970de057d5ca4ef9da9a55dfda1c /lib/VNDBUtil.pm
parent3eeada61ec270193902d8a5ceb80807028da874d (diff)
VNDBUtil::bb2html(): Fixed bug when the string starts with a VNDBID
Diffstat (limited to 'lib/VNDBUtil.pm')
-rw-r--r--lib/VNDBUtil.pm2
1 files changed, 1 insertions, 1 deletions
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 '<a href="/%s">%1$s</a>', $match;