commit 25f3b150e4496afadb32bf02a93add1081acd34d
parent d0441d334e79e99e11e166a295d16cec81b8883d
Author: Simon Kornblith <simon@simonster.com>
Date: Sun, 6 Jun 2010 06:46:10 +0000
- update to citeproc-js 1.0.24
From Frank's 1.0.23 announcement:
Cope with two disambiguation cases, involving add-names and
add-givenname, that succeeded in crashing the processor.
From Frank's 1.0.24 announcement:
Cope with item IDs of numeric type, and roll back
one patch from 1.0.23 that becomes unnecessary as
a result.
Together, these updates fix several issues with citation previewing.
Diffstat:
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/chrome/content/zotero/xpcom/citeproc.js b/chrome/content/zotero/xpcom/citeproc.js
@@ -1432,7 +1432,7 @@ CSL.dateParser = function (txt) {
};
CSL.Engine = function (sys, style, lang, xmlmode) {
var attrs, langspec, localexml, locale;
- this.processor_version = "1.0.22";
+ this.processor_version = "1.0.24";
this.csl_version = "1.0";
this.sys = sys;
this.sys.xml = new CSL.System.Xml.Parsing();
@@ -7178,7 +7178,7 @@ CSL.Registry.prototype.dorefreshes = function () {
}
};
CSL.Registry.prototype.setdisambigs = function () {
- var akey, leftovers, key, pos, len;
+ var akey, leftovers, key, pos, len, id;
this.leftovers = [];
for (akey in this.akeys) {
if (this.akeys.hasOwnProperty(akey)) {
@@ -7286,8 +7286,8 @@ CSL.Registry.prototype.registerAmbigToken = function (akey, id, ambig_config) {
if (!this.ambigcites[akey]) {
this.ambigcites[akey] = [];
}
- if (this.ambigcites[akey].indexOf(id) === -1) {
- this.ambigcites[akey].push(id);
+ if (this.ambigcites[akey].indexOf("" + id) === -1) {
+ this.ambigcites[akey].push("" + id);
}
this.registry[id].ambig = akey;
var dome = false;
@@ -7441,7 +7441,7 @@ CSL.Registry.NameReg = function (state) {
};
delitems = function (ids) {
var i, item, pos, len, posA, posB, id, fullkey, llen, ppos, otherid;
- if ("string" === typeof ids) {
+ if ("string" === typeof ids || "number" === typeof ids) {
ids = [ids];
}
ret = {};
@@ -7457,6 +7457,9 @@ CSL.Registry.NameReg = function (state) {
pkey = key[0];
ikey = key[1];
skey = key[2];
+ if ("undefined" === typeof this.namereg[pkey]) {
+ continue;
+ }
posA = this.namereg[pkey].items.indexOf(posA);
items = this.namereg[pkey].items;
if (skey) {
@@ -7902,4 +7905,4 @@ CSL.getModes = function () {
CSL.Registry.CitationReg = function (state) {
this.citationById = {};
this.citationByIndex = [];
-};
+};
+\ No newline at end of file