Upgrade citeproc-js to version 1.0.303

This commit is contained in:
Frank 2012-03-20 22:36:01 +08:00 committed by Simon Kornblith
parent 92a7ebee4c
commit 6de53ad37c

View file

@ -1138,7 +1138,7 @@ CSL.Output.Queue.prototype.string = function (state, myblobs, blob) {
ret = ret.concat(addtoret);
}
if (blobjr.strings.first_blob) {
state.registry.registry[state.tmp.count_offset_characters].offset = state.tmp.offset_characters;
state.registry.registry[blobjr.strings.first_blob].offset = state.tmp.offset_characters;
state.tmp.count_offset_characters = false;
}
}
@ -2156,7 +2156,7 @@ CSL.DateParser = function () {
};
CSL.Engine = function (sys, style, lang, forceLang) {
var attrs, langspec, localexml, locale;
this.processor_version = "1.0.302";
this.processor_version = "1.0.303";
this.csl_version = "1.0";
this.sys = sys;
this.sys.xml = new CSL.System.Xml.Parsing();
@ -7302,6 +7302,13 @@ CSL.Node.number = {
varname = this.variables[0];
state.parallel.StartVariable(this.variables[0]);
state.parallel.AppendToVariable(Item[this.variables[0]]);
if (this.text_case_normal) {
var value = Item[this.variables[0]];
if (value) {
value = value.replace("\\", "");
state.output.append(value, this)
}
} else {
var node = this;
if (!state.tmp.shadow_numbers[varname]
|| (state.tmp.shadow_numbers[varname].values.length
@ -7343,6 +7350,7 @@ CSL.Node.number = {
state.output.closeLevel("empty");
}
}
}
state.parallel.CloseVariable("number");
};
this.execs.push(func);
@ -8430,6 +8438,9 @@ CSL.Attributes["@page-range-format"] = function (state, arg) {
};
CSL.Attributes["@text-case"] = function (state, arg) {
var func = function (state, Item) {
if (arg === "normal") {
this.text_case_normal = true;
} else {
this.strings["text-case"] = arg;
if (arg === "title") {
var m = false;
@ -8453,6 +8464,7 @@ CSL.Attributes["@text-case"] = function (state, arg) {
this.strings["text-case"] = "passthrough";
}
}
}
};
this.execs.push(func);
};