Look for abbreviations for longest possible match first
This commit is contained in:
parent
38580e2366
commit
6393c3bfe2
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue