www

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

commit 6393c3bfe2aba1f49e1b6dec91344800e781e8cb
parent 38580e23663b484cf4f6a73ea01d6b2d9d3f391e
Author: Aurimas Vinckevicius <aurimas.dev@gmail.com>
Date:   Tue, 17 Sep 2013 21:41:34 -0500

Look for abbreviations for longest possible match first

Diffstat:
Mchrome/content/zotero/xpcom/cite.js | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/cite.js b/chrome/content/zotero/xpcom/cite.js @@ -419,7 +419,7 @@ Zotero.Cite.getAbbreviation = new function() { newWord = cat[lcWord]; } else { // Partial match - for(var k=1; k<=word.length && newWord === undefined; k++) { + for(var k=word.length; k>0 && newWord === undefined; k--) { newWord = cat[lcWord.substr(0, k)+"-"]; if(newWord && word.length - newWord.length < 1) { newWord = undefined;