From 7bcc25e98655e1bbd53d7b39f159f5a2f97c4b20 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 18 Jun 2012 16:50:33 -0400 Subject: [PATCH] Trim lines received from pdftotext --- chrome/content/zotero/recognizePDF.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/recognizePDF.js b/chrome/content/zotero/recognizePDF.js index ae3df7494..7eca1ab13 100644 --- a/chrome/content/zotero/recognizePDF.js +++ b/chrome/content/zotero/recognizePDF.js @@ -301,7 +301,7 @@ Zotero_RecognizePDF.Recognizer.prototype.recognize = function(file, libraryID, c var lineLengths = []; var str = {}; while(intlStream.readLine(str)) { - var line = lineRe.exec(str.value); + var line = lineRe.exec(str.value.trim()); if(line) { lines.push(line[1]); lineLengths.push(line[1].length);