commit ea72301c766525323c4a271a6342c93e126267bf
parent d70a1ed7fe9f817707cdf2a062faddc3092c6d47
Author: Frank <biercenator@gmail.com>
Date: Sun, 8 Jan 2012 10:25:21 +0800
Upgrade citeproc-js to version 1.0.253
Diffstat:
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/chrome/content/zotero/xpcom/citeproc.js b/chrome/content/zotero/xpcom/citeproc.js
@@ -1963,7 +1963,7 @@ CSL.DateParser = function () {
};
CSL.Engine = function (sys, style, lang, forceLang) {
var attrs, langspec, localexml, locale;
- this.processor_version = "1.0.252";
+ this.processor_version = "1.0.253";
this.csl_version = "1.0";
this.sys = sys;
this.sys.xml = new CSL.System.Xml.Parsing();
@@ -3586,6 +3586,7 @@ CSL.getCitationCluster = function (inputList, citationID) {
params.have_collapsed = this.tmp.have_collapsed;
myparams.push(params);
}
+ this.tmp.has_purged_parallel = false;
this.parallel.PruneOutputQueue(this);
empties = 0;
myblobs = this.output.queue.slice();
@@ -3642,14 +3643,18 @@ CSL.getCitationCluster = function (inputList, citationID) {
return composite;
}
if ("object" === typeof composite && composite.length === 0 && !item["suppress-author"]) {
- composite.push("[CSL STYLE ERROR: reference with no printed form.]");
+ if (this.tmp.has_purged_parallel) {
+ composite.push("");
+ } else {
+ composite.push("[CSL STYLE ERROR: reference with no printed form.]");
+ }
}
if (objects.length && "string" === typeof composite[0]) {
composite.reverse();
var tmpstr = composite.pop();
if (tmpstr && tmpstr.slice(0, 1) === ",") {
objects.push(tmpstr);
- } else {
+ } else if (tmpstr) {
objects.push(txt_esc(this.tmp.splice_delimiter) + tmpstr);
}
} else {
@@ -8828,6 +8833,7 @@ CSL.Parallel.prototype.purgeVariableBlobs = function (cite, varnames) {
for (ppos = llen; ppos > -1; ppos += -1) {
b = cite[varname].blobs[ppos];
b[0].blobs = b[0].blobs.slice(0, b[1]).concat(b[0].blobs.slice((b[1] + 1)));
+ this.state.tmp.has_purged_parallel = true;
if (b[0] && b[0].strings && "string" == typeof b[0].strings.oops
&& b[0].parent && b[0].parent) {
b[0].parent.parent.strings.delimiter = b[0].strings.oops;