diff --git a/chrome/content/zotero/xpcom/cite.js b/chrome/content/zotero/xpcom/cite.js index 90b138699..41ca94481 100644 --- a/chrome/content/zotero/xpcom/cite.js +++ b/chrome/content/zotero/xpcom/cite.js @@ -375,8 +375,10 @@ Zotero.CSL.prototype.formatCitation = function(citation, format) { var span = []; // loop through citation numbers and collect ranges in span for(var i in citationNumbers) { - if(i == parseInt(previousI, 10)+1) { // could be part of a range - // including the previous number + if(i != -1 && !citation.citationItems[citationNumbers[i]].prefix + && !citation.citationItems[citationNumbers[i]].suffix + && i == parseInt(previousI, 10)+1) { + // could be part of a range including the previous number span.push(citationNumbers[i]); } else { // not part of a range if(span.length) citationItems[span[0]] = citation.citationItems[span[0]]; @@ -1474,7 +1476,7 @@ Zotero.CSL.prototype.cachedSort = function(items, context, field) { var cache = new Object(); for(var i=0; i