commit 9b133c40aace7a3afbb8263f954619321cbc5c16
parent 88e1eca94919614511258864f1dec9ebc1b311d9
Author: Dan Stillman <dstillman@zotero.org>
Date: Tue, 3 Jan 2012 23:25:17 -0500
Ignore old-style Mac newlines in conflict resolution
Diffstat:
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
@@ -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)