update to citeproc-js 1.0.53 (finally)
In this release: Fix a subtle bug that caused full author names to be erroneously rendered in citations although the style parameters did not permit them.
This commit is contained in:
parent
8920eec3a8
commit
937b583c9f
1 changed files with 15 additions and 8 deletions
|
@ -58,8 +58,11 @@ if (!Array.indexOf) {
|
|||
};
|
||||
}
|
||||
var CSL = {
|
||||
debug: function (str) {
|
||||
print("CSL: " + str);
|
||||
},
|
||||
error: function (str) {
|
||||
print(str);
|
||||
print("CSL error: " + str);
|
||||
},
|
||||
ERROR_NO_RENDERED_FORM: 1,
|
||||
PREVIEW: "Just for laughs.",
|
||||
|
@ -1503,7 +1506,7 @@ CSL.dateParser = function (txt) {
|
|||
};
|
||||
CSL.Engine = function (sys, style, lang, xmlmode) {
|
||||
var attrs, langspec, localexml, locale;
|
||||
this.processor_version = "1.0.52";
|
||||
this.processor_version = "1.0.53";
|
||||
this.csl_version = "1.0";
|
||||
this.sys = sys;
|
||||
this.sys.xml = new CSL.System.Xml.Parsing();
|
||||
|
@ -4255,7 +4258,9 @@ CSL.Node.names = {
|
|||
state.tmp.disambig_restore = CSL.cloneAmbigConfig(state.tmp.disambig_settings);
|
||||
param = paramx;
|
||||
}
|
||||
state.tmp.disambig_settings.givens[state.tmp.nameset_counter][ppos] = param;
|
||||
if (!state.tmp.sort_key_flag) {
|
||||
state.tmp.disambig_settings.givens[state.tmp.nameset_counter][ppos] = param;
|
||||
}
|
||||
}
|
||||
label = false;
|
||||
if (state.output.getToken("label").strings.label_position) {
|
||||
|
@ -6158,7 +6163,9 @@ CSL.Util.Names.StartMiddleEnd.prototype.outputNameParts = function (subsequence)
|
|||
key = subsequence[pos];
|
||||
namepart = this.name[key];
|
||||
if (["given", "suffix", "dropping-particle"].indexOf(key) > -1 && 0 === state.tmp.disambig_settings.givens[state.tmp.nameset_counter][this.namenum + this.nameoffset]) {
|
||||
continue;
|
||||
if (!(key === "given" && !this.name.family)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ("given" === key) {
|
||||
if (1 === state.tmp.disambig_settings.givens[state.tmp.nameset_counter][(this.namenum + this.nameoffset)]) {
|
||||
|
@ -7695,7 +7702,7 @@ CSL.getSortKeys = function (Item, key_type) {
|
|||
return this[key_type].keys;
|
||||
};
|
||||
CSL.Registry.NameReg = function (state) {
|
||||
var pkey, ikey, skey, floor, ceiling, param, dagopt, gdropt, ret, pos, items, strip_periods, set_keys, evalname, delitems, addname, key, myitems;
|
||||
var pkey, ikey, skey, floor, ceiling, dagopt, gdropt, ret, pos, items, strip_periods, set_keys, evalname, delitems, addname, key, myitems;
|
||||
this.state = state;
|
||||
this.namereg = {};
|
||||
this.nameind = {};
|
||||
|
@ -7716,10 +7723,10 @@ CSL.Registry.NameReg = function (state) {
|
|||
}
|
||||
};
|
||||
evalname = function (item_id, nameobj, namenum, request_base, form, initials) {
|
||||
var pos, len, items;
|
||||
var pos, len, items, param;
|
||||
set_keys(this.state, item_id, nameobj);
|
||||
if ("undefined" === typeof this.namereg[pkey] || "undefined" === typeof this.namereg[pkey].ikey[ikey]) {
|
||||
return 2;
|
||||
return request_base;
|
||||
}
|
||||
param = 2;
|
||||
dagopt = state.opt["disambiguate-add-givenname"];
|
||||
|
@ -8233,4 +8240,4 @@ CSL.Disambiguation.prototype.decrementNames = function () {
|
|||
CSL.Registry.CitationReg = function (state) {
|
||||
this.citationById = {};
|
||||
this.citationByIndex = [];
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue