commit a1428f47ea2066486d9a8c8b2aef01defa0d80af
parent 0684030d9b8b32f9472adea39fb779638fe57c15
Author: Dan Stillman <dstillman@zotero.org>
Date: Sun, 23 Aug 2009 20:47:21 +0000
Find DOIs without "DOI: " prefix in the PDF recognizer
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git 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