From a1428f47ea2066486d9a8c8b2aef01defa0d80af Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 23 Aug 2009 20:47:21 +0000 Subject: [PATCH] Find DOIs without "DOI: " prefix in the PDF recognizer --- chrome/content/zotero/recognizePDF.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/recognizePDF.js b/chrome/content/zotero/recognizePDF.js index 1e444df15e..e933c10c73 100644 --- a/chrome/content/zotero/recognizePDF.js +++ b/chrome/content/zotero/recognizePDF.js @@ -26,7 +26,6 @@ const Zotero_RecognizePDF_SUCCESS_IMAGE = "chrome://zotero/skin/tick.png"; const Zotero_RecognizePDF_FAILURE_IMAGE = "chrome://zotero/skin/cross.png"; const Zotero_RecognizePDF_LOADING_IMAGE = "chrome://global/skin/icons/loading_16.png"; -const DOIre = /doi:\s*(10\.[\w.]+\/[^\/\s]+)/i; /** * Front end for recognizing PDFs @@ -316,9 +315,9 @@ Zotero_RecognizePDF.Recognizer.prototype.recognize = function(file, callback, ca // look for DOI var allText = lines.join("\n"); Zotero.debug(allText); - var m = DOIre.exec(allText); + var m = Zotero.Utilities.prototype.cleanDOI(allText); if(m) { - this._DOI = m[1]; + this._DOI = m[0]; } // get (not quite) median length