commit e0f88aeb6cb3430c81889144dd47260196bf228b
parent 785f4f6663de324cb046087c165c384dd3b9533b
Author: Simon Kornblith <simon@simonster.com>
Date: Thu, 31 Mar 2011 19:35:31 +0000
update to citeproc-js 1.0.138
Diffstat:
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/chrome/content/zotero/xpcom/citeproc.js b/chrome/content/zotero/xpcom/citeproc.js
@@ -1777,7 +1777,7 @@ CSL.DateParser = function (txt) {
};
CSL.Engine = function (sys, style, lang, forceLang) {
var attrs, langspec, localexml, locale;
- this.processor_version = "1.0.136";
+ this.processor_version = "1.0.138";
this.csl_version = "1.0";
this.sys = sys;
this.sys.xml = new CSL.System.Xml.Parsing();
@@ -2899,9 +2899,11 @@ CSL.Engine.prototype.processCitationCluster = function (citation, citationsPre,
for (key in this.tmp.taintedItemIDs) {
if (this.tmp.taintedItemIDs.hasOwnProperty(key)) {
citations = this.registry.citationreg.citationsByItemId[key];
+ if (citations) {
for (pos = 0, len = citations.length; pos < len; pos += 1) {
this.tmp.taintedCitationIDs[citations[pos].citationID] = true;
}
+ }
}
}
ret = [];
@@ -3126,6 +3128,7 @@ CSL.getCitationCluster = function (inputList, citationID) {
composite = this.output.string(this, this.output.queue);
this.tmp.suppress_decorations = false;
if (item && item["author-only"]) {
+ this.tmp.suppress_decorations = false;
return composite;
}
if ("object" === typeof composite && composite.length === 0 && !item["suppress-author"]) {
@@ -3171,6 +3174,7 @@ CSL.getCitationCluster = function (inputList, citationID) {
}
}
}
+ this.tmp.suppress_decorations = false;
return result;
};
CSL.getCite = function (Item, item, prevItemID) {
@@ -7382,7 +7386,7 @@ CSL.Util.Names.initNameSlices = function (state) {
CSL.Engine.prototype.parseName = function (name) {
var m, idx;
if (! name["non-dropping-particle"] && name.family) {
- m = name.family.match(/^([ a-z]+\s+)/);
+ m = name.family.match(/^([[ \'\u2019a-z]+\s+)/);
if (m) {
name.family = name.family.slice(m[1].length);
name["non-dropping-particle"] = m[1].replace(/\s+$/, "");
@@ -7400,7 +7404,7 @@ CSL.Engine.prototype.parseName = function (name) {
}
}
if (! name["dropping-particle"] && name.given) {
- m = name.given.match(/^(\s+[ a-z]*[a-z])$/);
+ m = name.given.match(/^(\s+[ \'\u2019a-z]*[a-z])$/);
if (m) {
name.given = name.given.slice(0, m[1].length * -1);
name["dropping-particle"] = m[2].replace(/^\s+/, "");
@@ -8117,7 +8121,7 @@ CSL.Util.FlipFlopper.prototype.getSplitStrings = function (str) {
head = strs.slice(0, (badTagPos - 1));
tail = strs.slice((badTagPos + 2));
sep = strs[badTagPos];
- if (sep.length && sep[0] !== "<" && this.openToDecorations[sep] && this.quotechars.indexOf(sep) === -1) {
+ if (sep.length && sep[0] !== "<" && this.openToDecorations[sep] && this.quotechars.indexOf(sep.replace(/\s+/g,"")) === -1) {
params = this.openToDecorations[sep];
sep = this.state.fun.decorate[params[0]][params[1][0]](this.state);
}
@@ -8572,12 +8576,12 @@ CSL.Registry.prototype.init = function (myitems, uncited_flag) {
if (uncited_flag && this.mylist && this.mylist.length) {
this.uncited = myitems;
for (pos = 0, len = myitems.length; pos < len; pos += 1) {
- if (!this.myhash[myitems[pos]]) {
- this.mylist.push(myitems[pos]);
+ if (!this.myhash[myitems[pos]] && this.mylist.indexOf(myitems[pos]) === -1) {
+ this.mylist.push("" + myitems[pos]);
}
}
} else {
- this.mylist = myitems;
+ this.mylist = myitems.concat(this.uncited);
}
this.myhash = {};
len = myitems.length;