Don't drop last word when abbreviating journal names

This commit is contained in:
Aurimas Vinckevicius 2013-09-17 21:52:10 -05:00
parent 6393c3bfe2
commit a55f9b624e

View file

@ -431,6 +431,9 @@ 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();