diff options
author | morkt <> | 2014-12-23 09:07:03 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2014-12-23 09:07:03 +0100 |
commit | 91aeed49a83a36660708b9eb3665d45fa3eb3c3d (patch) | |
tree | 01d5aa151788a6eb26e8b87824e9241be33ca1dd | |
parent | 2401c43c686a5222b75b7cf587591312c77f6017 (diff) |
bbSubstLinks: Fix minor parsing issue
Patch from https://vndb.org/t5564.18
-rw-r--r-- | lib/VNDB/Util/Misc.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VNDB/Util/Misc.pm b/lib/VNDB/Util/Misc.pm index 612178c3..79ac8edc 100644 --- a/lib/VNDB/Util/Misc.pm +++ b/lib/VNDB/Util/Misc.pm @@ -149,7 +149,7 @@ sub bbSubstLinks { # pre-parse vndb links within message body my (%lookup, %links); - while ($msg =~ m/(?:^|\s)\K([vcpgi])([1-9][0-9]*)(?=$|\b[^.])/g) { + while ($msg =~ m/(?:^|\s)\K([vcpgi])([1-9][0-9]*)\b/g) { $lookup{$1}{$2} = 1; } return $msg unless %lookup; @@ -173,7 +173,7 @@ sub bbSubstLinks { my($result, @open) = ('', 'first'); while($msg =~ m{ - (\b[tdvprcugi][1-9][0-9]*(?=$|\b[^.])) | # 1. id + (\b[tdvprcugi][1-9][0-9]*(?:\.[1-9][0-9]*)?\b)| # 1. id (\[[^\s\]]+\]) | # 2. tag ((?:https?|ftp)://[^><"\n\s\]\[]+[\d\w=/-]) # 3. url }x) { |