From 8a4a8bafbe86690b0bc7eb87d31930dcc6ab90a7 Mon Sep 17 00:00:00 2001 From: Avram Lyon Date: Mon, 8 Nov 2010 11:53:54 +0000 Subject: [PATCH] Trans: Fix for misinterpretation of EBSCO's M3 field as DOI --- translators/EBSCOhost.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/translators/EBSCOhost.js b/translators/EBSCOhost.js index 7119bc231..1b241437e 100644 --- a/translators/EBSCOhost.js +++ b/translators/EBSCOhost.js @@ -97,9 +97,8 @@ function downloadFunction(text) { downloadString, function(text) { // get marked records as RIS Zotero.debug(text); // load translator for RIS - var test = text.match(/UR\s+\-(.*)/g); - if (text.match(/AB\s\s\-/)) text = text.replace(/AB\s\s\-/, "N2 -"); - if (!text.match(/TY\s\s-/)) text = text+"\nTY - JOUR\n"; + if (text.match(/^AB\s\s\-/m)) text = text.replace(/^AB\s\s\-/m, "N2 -"); + if (!text.match(/^TY\s\s-/m)) text = text+"\nTY - JOUR\n"; // load translator for RIS var translator = Zotero.loadTranslator("import"); translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); @@ -108,6 +107,9 @@ function downloadFunction(text) { if (text.match(/^L3\s+-\s*(.*)/m)) { item.DOI = text.match(/^L3\s+\-\s*(.*)/m)[1]; } + if (text.match(/^M3\s+-\s*(.*)/m)) { + if (item.DOI == text.match(/^M3\s+\-\s*(.*)/m)[1]) item.DOI = ""; + } if (text.match(/^DO\s+-\s*(.*)/m)) { item.DOI = text.match(/^DO\s+-\s*(.*)/m)[1]; }