www

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

commit ea12afa045042a2e6042648c2c31b8caecdada3c
parent f81f86c92d3159f0974b664267fbe9ababb17cb7
Author: Simon Kornblith <simon@simonster.com>
Date:   Thu,  4 Apr 2013 11:11:03 -0400

Fix abbreviation of single word titles

https://forums.zotero.org/discussion/28687/

Diffstat:
Mchrome/content/zotero/xpcom/cite.js | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/cite.js b/chrome/content/zotero/xpcom/cite.js @@ -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) {