commit 5e4c464cf515707fa7ebab0197dac57f874847f0
parent 339225f2fb876f24009a4945ba827e3eceeec5e1
Author: Simon Kornblith <simon@simonster.com>
Date: Thu, 4 Apr 2013 22:23:56 -0400
Fix lookup of <8 digit PMIDs
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/chrome/content/zotero/lookup.js b/chrome/content/zotero/lookup.js
@@ -76,9 +76,9 @@ const Zotero_Lookup = new function () {
//finally try for PMID
if(!items.length) {
- // PMID; right now, PMIDs are 8 digits, so it doesn't seem like we will need to
- // discriminate for a fairly long time
- var PMID_RE = /(?:\D|^)(\d{8})(?!\d)/g;
+ // PMID; right now, the longest PMIDs are 8 digits, so it doesn't
+ // seem like we will need to discriminate for a fairly long time
+ var PMID_RE = /(?:\D|^)(\d{1,9})(?!\d)/g;
var pmid;
while((pmid = PMID_RE.exec(identifier)) && foundIDs.indexOf(pmid) == -1) {
items.push({itemType:"journalArticle", contextObject:"rft_id=info:pmid/"+pmid[1]});