From 9b133c40aace7a3afbb8263f954619321cbc5c16 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 3 Jan 2012 23:25:17 -0500 Subject: [PATCH] Ignore old-style Mac newlines in conflict resolution --- chrome/content/zotero/xpcom/data/item.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index f2beb679a..a3bd986e1 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -3747,9 +3747,9 @@ Zotero.Item.prototype.diff = function (item, includeMatches, ignoreFields) { var thisNote = thisData.note; var otherNote = otherData.note; - // Stop Windows newlines from triggering erroneous conflicts - thisNote = thisNote.replace(/\r\n/g, "\n"); - otherNote = otherNote.replace(/\r\n/g, "\n"); + // Stop non-Unix newlines from triggering erroneous conflicts + thisNote = thisNote.replace(/(\r\n?/g, "\n"); + otherNote = otherNote.replace(/\r\n?/g, "\n"); // Normalize multiple spaces (due to differences TinyMCE, Z.U.text2html(), // and the server)