From 687997e963b5fa14d38d0d52568570fb79b50dac Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Sun, 10 Mar 2013 16:17:15 -0400 Subject: [PATCH] Parse PMIDs from extra field --- chrome/content/zotero/xpcom/cite.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/chrome/content/zotero/xpcom/cite.js b/chrome/content/zotero/xpcom/cite.js index b451f8c68a..a19779db7e 100644 --- a/chrome/content/zotero/xpcom/cite.js +++ b/chrome/content/zotero/xpcom/cite.js @@ -434,6 +434,13 @@ Zotero.Cite.System = { } } } + + // extract PMID + var extra = zoteroItem.getField("extra", false, true); + if(typeof extra === "string") { + var m = /(?:^|\n)PMID:\s*([0-9]+)/.exec(extra); + if(m) cslItem.PMID = m[1]; + } //this._cache[zoteroItem.id] = cslItem; return cslItem;