www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit a55f9b624e2ffa4dccac1f222df53bdd59217c71
parent 6393c3bfe2aba1f49e1b6dec91344800e781e8cb
Author: Aurimas Vinckevicius <aurimas.dev@gmail.com>
Date:   Tue, 17 Sep 2013 21:52:10 -0500

Don't drop last word when abbreviating journal names

Diffstat:
Mchrome/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 @@ -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();