From 6dc762df299083e47b64669e3fb169439ebf3e93 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 24 Mar 2008 15:10:25 +0000 Subject: [PATCH] closes #954, disambiguate-add-year-suffix should only add suffix if year is the same --- chrome/content/zotero/xpcom/cite.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/xpcom/cite.js b/chrome/content/zotero/xpcom/cite.js index 4701db520..9e6281033 100644 --- a/chrome/content/zotero/xpcom/cite.js +++ b/chrome/content/zotero/xpcom/cite.js @@ -338,7 +338,7 @@ Zotero.CSL.prototype.createCitation = function(citationItems) { /* * create a citation (in-text or footnote) */ -Zotero.CSL._firstNameRegexp = /^[a-zA-Z0-9]*/; +Zotero.CSL._firstNameRegexp = /^[^\s]*/; Zotero.CSL._textCharRegexp = /[a-zA-Z0-9]/; Zotero.CSL._numberRegexp = /\d+/; Zotero.CSL.prototype.formatCitation = function(citation, format) { @@ -2508,15 +2508,18 @@ Zotero.CSL.ItemSet.prototype.resort = function() { // determine how to format name var theNames = allNames[lastName]; if(theNames && theNames.length > 1) { - nameType[lastName] = Zotero.CSL.NAME_USE_INITIAL; + // have two items with identical last names but different + // first names + nameType[lastName] = Zotero.CSL.NAME_USE_INITIAL; + // check initials to see if any match var initials = new Object(); for(var k=0; k