From 1b41478e21d66bfe790b9a43c72726b225f80458 Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 3 May 2012 13:11:19 +0000 Subject: [PATCH] Upgrade citeproc-js to version 1.0.329 --- chrome/content/zotero/xpcom/citeproc.js | 29 ++++++++++++++----------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/chrome/content/zotero/xpcom/citeproc.js b/chrome/content/zotero/xpcom/citeproc.js index 3e3626eb1..bfb67c3a6 100644 --- a/chrome/content/zotero/xpcom/citeproc.js +++ b/chrome/content/zotero/xpcom/citeproc.js @@ -2189,7 +2189,7 @@ CSL.DateParser = function () { }; CSL.Engine = function (sys, style, lang, forceLang) { var attrs, langspec, localexml, locale; - this.processor_version = "1.0.328"; + this.processor_version = "1.0.329"; this.csl_version = "1.0"; this.sys = sys; this.sys.xml = new CSL.System.Xml.Parsing(); @@ -2620,7 +2620,6 @@ CSL.Engine.prototype.remapSectionVariable = function (inputList) { var value = false; if (["bill","gazette","legislation"].indexOf(Item.type) > -1) { if (!Item.section - && !Item.page && this.opt.development_extensions.clobber_locator_if_no_statute_section) { item.locator = undefined; item.label = undefined; @@ -6025,16 +6024,18 @@ CSL.NameOutput.prototype._clearValues = function (values) { } }; CSL.NameOutput.prototype._checkNickname = function (name) { - var author = ""; - author = CSL.Util.Names.getRawName(name); - if (author && this.state.sys.getAbbreviation && !(this.item && this.item["suppress-author"])) { - this.state.transform.loadAbbreviation("default", "nickname", author); - var myLocalName = this.state.transform.abbrevs["default"].nickname[author]; - if (myLocalName) { - if (myLocalName === "{suppress}") { - name = false; - } else { - name = {family:myLocalName,given:''}; + if (["interview", "personal_communication"].indexOf(this.Item.type) > -1) { + var author = ""; + author = CSL.Util.Names.getRawName(name); + if (author && this.state.sys.getAbbreviation && !(this.item && this.item["suppress-author"])) { + this.state.transform.loadAbbreviation("default", "nickname", author); + var myLocalName = this.state.transform.abbrevs["default"].nickname[author]; + if (myLocalName) { + if (myLocalName === "{suppress}") { + name = false; + } else { + name = {family:myLocalName,given:''}; + } } } } @@ -12473,7 +12474,9 @@ CSL.Disambiguation.prototype.getCiteData = function(Item, base) { } }; CSL.Disambiguation.prototype.captureStepToBase = function() { - this.betterbase.givens[this.gnameset][this.gname] = this.base.givens[this.gnameset][this.gname]; + if (this.state.opt["givenname-disambiguation-rule"] === "by-cite") { + this.betterbase.givens[this.gnameset][this.gname] = this.base.givens[this.gnameset][this.gname]; + } this.betterbase.names[this.gnameset] = this.base.names[this.gnameset]; }; CSL.Registry.CitationReg = function (state) {