Fix abbreviation of single word titles

https://forums.zotero.org/discussion/28687/
This commit is contained in:
Simon Kornblith 2013-04-04 11:11:03 -04:00
parent 193b10a1f5
commit e51434416a

View file

@ -429,12 +429,14 @@ Zotero.Cite.getAbbreviation = new function() {
}
// Fall back to full word
if(newWord === undefined ) newWord = word;
if(newWord === undefined) newWord = word;
words[j] = newWord.substr(0, 1).toUpperCase() + newWord.substr(1);
}
abbreviation = words.join("").replace(/\s+/g, " ").trim();
} else {
abbreviation = key;
}
abbreviation = words.join("").replace(/\s+/g, " ").trim();
}
if(!abbreviation || abbreviation === key) {