Update citeproc-js to 1.1.139
This commit is contained in:
parent
55ee55ed7b
commit
6e21bb4b57
1 changed files with 10 additions and 14 deletions
|
@ -23,7 +23,7 @@
|
|||
* <http://www.gnu.org/licenses/> respectively.
|
||||
*/
|
||||
var CSL = {
|
||||
PROCESSOR_VERSION: "1.1.138",
|
||||
PROCESSOR_VERSION: "1.1.139",
|
||||
CONDITION_LEVEL_TOP: 1,
|
||||
CONDITION_LEVEL_BOTTOM: 2,
|
||||
PLAIN_HYPHEN_REGEX: /(?:[^\\]-|\u2013)/,
|
||||
|
@ -2967,21 +2967,13 @@ CSL.Engine.prototype.setOpt = function (token, name, value) {
|
|||
}
|
||||
};
|
||||
CSL.Engine.prototype.inheritOpt = function (token, attrname, parentname, defaultValue) {
|
||||
if (parentname === "name-form") {
|
||||
}
|
||||
if ("undefined" !== typeof token.strings[attrname]) {
|
||||
if (parentname === "name-form") {
|
||||
}
|
||||
return token.strings[attrname];
|
||||
} else {
|
||||
var parentValue = this[this.tmp.root].opt.inheritedAttributes[parentname ? parentname : attrname];
|
||||
if ("undefined" !== typeof parentValue) {
|
||||
if (parentname === "name-form") {
|
||||
}
|
||||
return parentValue;
|
||||
} else {
|
||||
if (parentname === "name-form") {
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
@ -5921,7 +5913,7 @@ CSL.Engine.prototype.setCitationId = function (citation, force) {
|
|||
while (true) {
|
||||
direction = 0;
|
||||
if (!this.registry.citationreg.citationById[id]) {
|
||||
citation.citationID = id.toString(32);
|
||||
citation.citationID = "a" + id.toString(32);
|
||||
break;
|
||||
} else if (!direction && id < 50000000000000) {
|
||||
direction = 1;
|
||||
|
@ -8564,11 +8556,11 @@ CSL.NameOutput.prototype._runDisambigNames = function (lst, pos) {
|
|||
}
|
||||
chk = this.state.tmp.disambig_settings.givens[pos][i];
|
||||
if ("undefined" === typeof chk) {
|
||||
myform = this.state.inheritOpt(this.name, "form", "name-form");
|
||||
myform = this.state.inheritOpt(this.name, "form", "name-form", "long");
|
||||
param = this.state.registry.namereg.evalname("" + this.Item.id, lst[i], i, 0, myform, myinitials);
|
||||
this.state.tmp.disambig_settings.givens[pos].push(param);
|
||||
}
|
||||
myform = this.state.inheritOpt(this.name, "form", "name-form");
|
||||
myform = this.state.inheritOpt(this.name, "form", "name-form", "long");
|
||||
paramx = this.state.registry.namereg.evalname("" + this.Item.id, lst[i], i, 0, myform, myinitials);
|
||||
if (this.state.tmp.disambig_request) {
|
||||
var val = this.state.tmp.disambig_settings.givens[pos][i];
|
||||
|
@ -8580,7 +8572,7 @@ CSL.NameOutput.prototype._runDisambigNames = function (lst, pos) {
|
|||
}
|
||||
param = val;
|
||||
if (this.state.opt["disambiguate-add-givenname"] && lst[i].given) {
|
||||
param = this.state.registry.namereg.evalname("" + this.Item.id, lst[i], i, param, this.state.inheritOpt(this.name, "form", "name-form"), this.state.inheritOpt(this.name, "initialize-with"));
|
||||
param = this.state.registry.namereg.evalname("" + this.Item.id, lst[i], i, param, this.state.inheritOpt(this.name, "form", "name-form", "long"), this.state.inheritOpt(this.name, "initialize-with"));
|
||||
}
|
||||
} else {
|
||||
param = paramx;
|
||||
|
@ -13991,7 +13983,11 @@ CSL.Util.outputNumericField = function(state, varname, itemID) {
|
|||
}
|
||||
}
|
||||
if (num.collapsible) {
|
||||
var blob = new CSL.NumericBlob(num.particle, parseInt(num.value, 10), numStyling, itemID);
|
||||
if (num.value.match(/^[0-9]+$/)) {
|
||||
var blob = new CSL.NumericBlob(num.particle, parseInt(num.value, 10), numStyling, itemID);
|
||||
} else {
|
||||
var blob = new CSL.NumericBlob(num.particle, num.value, numStyling, itemID);
|
||||
}
|
||||
if ("undefined" === typeof blob.gender) {
|
||||
blob.gender = state.locale[state.opt.lang]["noun-genders"][varname];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue