From 4a475ff3aa9b73d010a532ecb41cb5fa7793c0e9 Mon Sep 17 00:00:00 2001 From: fbennett Date: Sun, 1 Nov 2015 11:00:37 +0900 Subject: [PATCH] Prevent duplicate items when copying citations to clipboard --- chrome/content/zotero/fileInterface.js | 1 + chrome/content/zotero/xpcom/quickCopy.js | 1 + 2 files changed, 2 insertions(+) diff --git a/chrome/content/zotero/fileInterface.js b/chrome/content/zotero/fileInterface.js index ba3ac11a76..f9074ab249 100644 --- a/chrome/content/zotero/fileInterface.js +++ b/chrome/content/zotero/fileInterface.js @@ -439,6 +439,7 @@ var Zotero_File_Interface = new function() { // add text (or HTML source) if(!asHTML) { + cslEngine = style.getCiteProc(locale); var bibliography = Zotero.Cite.makeFormattedBibliographyOrCitationList(cslEngine, items, "text", asCitations); } var str = Components.classes["@mozilla.org/supports-string;1"]. diff --git a/chrome/content/zotero/xpcom/quickCopy.js b/chrome/content/zotero/xpcom/quickCopy.js index 604b195aa3..121d0f6294 100644 --- a/chrome/content/zotero/xpcom/quickCopy.js +++ b/chrome/content/zotero/xpcom/quickCopy.js @@ -375,6 +375,7 @@ Zotero.QuickCopy = new function() { var style = Zotero.Styles.get(format.id); var cslEngine = style.getCiteProc(locale); var html = Zotero.Cite.makeFormattedBibliographyOrCitationList(cslEngine, items, "html"); + cslEngine = style.getCiteProc(locale); var text = Zotero.Cite.makeFormattedBibliographyOrCitationList(cslEngine, items, "text"); }