From a55f9b624e2ffa4dccac1f222df53bdd59217c71 Mon Sep 17 00:00:00 2001 From: Aurimas Vinckevicius Date: Tue, 17 Sep 2013 21:52:10 -0500 Subject: [PATCH] Don't drop last word when abbreviating journal names --- chrome/content/zotero/xpcom/cite.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/cite.js b/chrome/content/zotero/xpcom/cite.js index f23f1e37c..24adae2a7 100644 --- a/chrome/content/zotero/xpcom/cite.js +++ b/chrome/content/zotero/xpcom/cite.js @@ -430,7 +430,10 @@ Zotero.Cite.getAbbreviation = new function() { // Fall back to full word if(newWord === undefined) newWord = word; - + + // Don't discard last word (e.g. Climate of the Past => Clim. Past) + if(!newWord && words.length<=j+2) newWord = word; + words[j] = newWord.substr(0, 1).toUpperCase() + newWord.substr(1); } abbreviation = words.join("").replace(/\s+/g, " ").trim();