Update citeproc-js to 1.4.63

73bc1b44bc
This commit is contained in:
Dan Stillman 2023-04-19 17:25:57 -04:00
parent ecbee6ee26
commit 9ce8855fa4

View file

@ -120,7 +120,6 @@ var CSL = {
"cmt.": "comment",
"dec.": "decision",
"dept.": "department",
"div.": "division",
"ex.": "example",
"fig.": "figure",
"fld.": "field",
@ -170,7 +169,6 @@ var CSL = {
"comment": "cmt.",
"decision": "dec.",
"department": "dept.",
"division": "div.",
"example": "ex.",
"figure": "fig.",
"field": "fld.",
@ -219,7 +217,6 @@ var CSL = {
"cmt": "comment",
"dec": "decision",
"dept": "department",
"div": "division",
"ex": "example",
"fig": "figure",
"fld": "field",
@ -725,33 +722,61 @@ var CSL = {
NAME_VARIABLES: [
"author",
"chair",
"collection-editor",
"compiler",
"composer",
"container-author",
"contributor",
"curator",
"director",
"editor",
"editor-translator",
"editorial-director",
"executive-producer",
"guest",
"host",
"illustrator",
"interviewer",
"narrator",
"organizer",
"original-author",
"performer",
"producer",
"recipient",
"reviewed-author",
"script-writer",
"series-creator",
"translator",
"commenter"
],
CREATORS: [
"author",
"chair",
"collection-editor",
"compiler",
"composer",
"container-author",
"contributor",
"curator",
"director",
"editor",
"editor-translator",
"editorial-director",
"executive-producer",
"guest",
"host",
"illustrator",
"interviewer",
"narrator",
"organizer",
"original-author",
"performer",
"producer",
"recipient",
"reviewed-author",
"script-writer",
"series-creator",
"translator",
"commenter"
],
@ -768,10 +793,13 @@ var CSL = {
"number",
"number-of-pages",
"number-of-volumes",
"part-number",
"printing-number",
"section",
"supplement-number",
"version",
"volume",
// "section", ??? add this?
"supplement",
"supplement", // maybe deprecated this? supplement-number should serve this purpose in standard CSL.
"citation-number"
],
//var x = new Array();
@ -1476,6 +1504,9 @@ var CSL = {
},
INIT_JURISDICTION_MACROS: function (state, Item, item, macroName) {
if (Item["best-jurisdiction"]) {
return true;
}
if (!state.sys.retrieveStyleModule || !CSL.MODULE_MACROS[macroName] || !Item.jurisdiction) {
return false;
}
@ -1495,6 +1526,7 @@ var CSL = {
}
}
}
var jurisdictionList = state.getJurisdictionList(Item.jurisdiction);
if (state.opt.parallel.enable) {
if (!state.parallel) {
state.parallel = new CSL.Parallel(state);
@ -1505,7 +1537,7 @@ var CSL = {
var jurisdiction = jurisdictionList[i];
if (item) {
if (state.juris[jurisdiction] && !item["best-jurisdiction"] && state.juris[jurisdiction].types.locator) {
item["best-jurisdiction"] = jurisdiction;
Item["best-jurisdiction"] = jurisdiction;
}
}
if(state.juris[jurisdiction] && state.juris[jurisdiction].types[Item.type]) {
@ -10032,7 +10064,7 @@ CSL.Node.date = {
CSL.Node["date-part"] = {
build: function (state, target) {
var func, pos, len, first_date, value, value_end, real, have_collapsed, invoked, precondition, known_year, bc, ad, bc_end, ad_end, ready, curr, dcurr, number, num, formatter, item;
var func, pos, len, first_date, value, value_end, real, have_collapsed, invoked, precondition, known_year, bc, ad, bc_end, ad_end, ready, curr, dcurr, number, num, formatter, item, blob;
if (!this.strings.form) {
this.strings.form = "long";
}
@ -10175,7 +10207,7 @@ CSL.Node["date-part"] = {
// and we reach this block, then we can combine the dates
// to a string, run minimial-two, and output the trailing
// year right here. No impact on other functionality.
if (state.opt["year-range-format"]
&& state.opt["year-range-format"] !== "expanded"
&& !state.tmp.date_object.day
@ -10183,7 +10215,7 @@ CSL.Node["date-part"] = {
&& !state.tmp.date_object.season
&& this.strings.name === "year"
&& value && value_end) {
// second argument adjusts collapse as required for years
// See OSCOLA section 1.3.2
value_end = state.fun.year_mangler(value + "-" + value_end, true);
@ -10193,13 +10225,21 @@ CSL.Node["date-part"] = {
last_string_output = value_end;
state.dateput.append(value_end, this);
if (first_date) {
state.dateput.current.value().blobs[0].strings.prefix = "";
blob = state.dateput.current.value().blobs[0];
if (blob) {
blob.strings.prefix = "";
}
}
}
last_string_output = value;
state.output.append(value, this);
curr = state.output.current.value();
curr.blobs[(curr.blobs.length - 1)].strings.suffix = "";
blob = curr.blobs[(curr.blobs.length - 1)];
if (blob) {
blob.strings.suffix = "";
}
if (this.strings["range-delimiter"]) {
state.output.append(this.strings["range-delimiter"]);
} else {
@ -10234,7 +10274,10 @@ CSL.Node["date-part"] = {
last_string_output = value_end;
state.dateput.append(value_end, this);
if (first_date) {
state.dateput.current.value().blobs[0].strings.prefix = "";
blob = state.dateput.current.value().blobs[0];
if (blob) {
blob.strings.prefix = "";
}
}
if (bc) {
last_string_output = bc;
@ -10326,8 +10369,6 @@ CSL.Node["date-part"] = {
}
};
/*global CSL: true */
CSL.Node["else-if"] = {
@ -11752,12 +11793,12 @@ CSL.Node["alternative-text"] = {
CSL.NameOutput = function(state, Item, item) {
this.debug = false;
this.state = state;
//SNIP-START
if (this.debug) {
print("(1)");
this.state.sys.print("(1)");
}
//SNIP-END
this.state = state;
this.Item = Item;
this.item = item;
this.nameset_base = 0;
@ -11911,21 +11952,21 @@ CSL.NameOutput.prototype.outputNames = function () {
//SNIP-START
if (this.debug) {
print("(2)");
this.state.sys.print("(2)");
}
//SNIP-END
// util_names_etalconfig.js
this.getEtAlConfig();
//SNIP-START
if (this.debug) {
print("(3)");
this.state.sys.print("(3)");
}
//SNIP-END
// util_names_divide.js
this.divideAndTransliterateNames();
//SNIP-START
if (this.debug) {
print("(4)");
this.state.sys.print("(4)");
}
//SNIP-END
// util_names_truncate.js
@ -11933,13 +11974,13 @@ CSL.NameOutput.prototype.outputNames = function () {
this.truncatePersonalNameLists();
//SNIP-START
if (this.debug) {
print("(5)");
this.state.sys.print("(5)");
}
//SNIP-END
//SNIP-START
if (this.debug) {
print("(6)");
this.state.sys.print("(6)");
}
//SNIP-END
// util_names_disambig.js
@ -11949,7 +11990,7 @@ CSL.NameOutput.prototype.outputNames = function () {
this.constrainNames();
//SNIP-START
if (this.debug) {
print("(7)");
this.state.sys.print("(7)");
}
//SNIP-END
// form="count"
@ -11963,25 +12004,25 @@ CSL.NameOutput.prototype.outputNames = function () {
//SNIP-START
if (this.debug) {
print("(8)");
this.state.sys.print("(8)");
}
//SNIP-END
this.setEtAlParameters();
//SNIP-START
if (this.debug) {
print("(9)");
this.state.sys.print("(9)");
}
//SNIP-END
this.setCommonTerm(this.requireMatch);
//SNIP-START
if (this.debug) {
print("(10)");
this.state.sys.print("(10)");
}
//SNIP-END
this.renderAllNames();
//SNIP-START
if (this.debug) {
print("(11)");
this.state.sys.print("(11)");
}
//SNIP-END
var blob_list = [];
@ -11995,7 +12036,7 @@ CSL.NameOutput.prototype.outputNames = function () {
} else {
//SNIP-START
if (this.debug) {
print("(11a)");
this.state.sys.print("(11a)");
}
//SNIP-END
for (var j = 0, jlen = this.institutions[v].length; j < jlen; j += 1) {
@ -12003,7 +12044,7 @@ CSL.NameOutput.prototype.outputNames = function () {
}
//SNIP-START
if (this.debug) {
print("(11b)");
this.state.sys.print("(11b)");
}
//SNIP-END
if (this.institutions[v].length) {
@ -12015,13 +12056,13 @@ CSL.NameOutput.prototype.outputNames = function () {
}
//SNIP-START
if (this.debug) {
print("(11c)");
this.state.sys.print("(11c)");
}
//SNIP-END
var varblob = this.joinFreetersAndInstitutionSets([this.freeters[v], institutions]);
//SNIP-START
if (this.debug) {
print("(11d)");
this.state.sys.print("(11d)");
}
//SNIP-END
}
@ -12034,7 +12075,7 @@ CSL.NameOutput.prototype.outputNames = function () {
}
//SNIP-START
if (this.debug) {
print("(11e)");
this.state.sys.print("(11e)");
}
//SNIP-END
if (this.common_term) {
@ -12043,14 +12084,14 @@ CSL.NameOutput.prototype.outputNames = function () {
}
//SNIP-START
if (this.debug) {
print("(12)");
this.state.sys.print("(12)");
}
//SNIP-END
this.state.output.openLevel("empty");
this.state.output.current.value().strings.delimiter = this.state.inheritOpt(this.names, "delimiter", "names-delimiter");
//SNIP-START
if (this.debug) {
print("(13)");
this.state.sys.print("(13)");
}
//SNIP-END
for (i = 0, ilen = blob_list.length; i < ilen; i += 1) {
@ -12062,20 +12103,20 @@ CSL.NameOutput.prototype.outputNames = function () {
}
//SNIP-START
if (this.debug) {
print("(14)");
this.state.sys.print("(14)");
}
//SNIP-END
this.state.output.closeLevel("empty");
//SNIP-START
if (this.debug) {
print("(15)");
this.state.sys.print("(15)");
}
//SNIP-END
var blob = this.state.output.pop();
this.state.tmp.name_node.top = blob;
//SNIP-START
if (this.debug) {
print("(16)");
this.state.sys.print("(16)");
}
//SNIP-END
@ -12092,14 +12133,14 @@ CSL.NameOutput.prototype.outputNames = function () {
}
//SNIP-START
if (this.debug) {
print("(17)");
this.state.sys.print("(17)");
}
//SNIP-END
// Also used in CSL.Util.substituteEnd (which could do with
// some cleanup at this writing).
//SNIP-START
if (this.debug) {
print("(18)");
this.state.sys.print("(18)");
}
//SNIP-END
if (variables[0] !== "authority") {
@ -12164,7 +12205,7 @@ CSL.NameOutput.prototype.outputNames = function () {
//SNIP-START
if (this.debug) {
print("(19)");
this.state.sys.print("(19)");
}
//SNIP-END
};
@ -12256,7 +12297,7 @@ CSL.NameOutput.prototype._collapseAuthor = function () {
this.state.registry.authorstrings[this.Item.id] = mystr;
} else if (!this.state.tmp.just_looking
&& !this.state.tmp.suppress_decorations && ((this.state[this.state.tmp.area].opt.collapse && this.state[this.state.tmp.area].opt.collapse.length) || this.state[this.state.tmp.area].opt.cite_group_delimiter && this.state[this.state.tmp.area].opt.cite_group_delimiter)) {
// XX1 print("RENDER: "+this.Item.id);
// XX1 this.state.sys.print("RENDER: "+this.Item.id);
mystr = "";
myqueue = this.state.tmp.name_node.top.blobs.slice(-1)[0].blobs;
oldchars = this.state.tmp.offset_characters;
@ -12265,7 +12306,7 @@ CSL.NameOutput.prototype._collapseAuthor = function () {
}
if (mystr === this.state.tmp.last_primary_names_string) {
if (this.item["suppress-author"] || (this.state[this.state.tmp.area].opt.collapse && this.state[this.state.tmp.area].opt.collapse.length)) {
// XX1 print(" CUT!");
// XX1 this.state.sys.print(" CUT!");
this.state.tmp.name_node.top.blobs.pop();
this.state.tmp.name_node.children = [];
// If popped, avoid side-effects on character counting: we're only interested
@ -12277,7 +12318,7 @@ CSL.NameOutput.prototype._collapseAuthor = function () {
this.state.tmp.use_cite_group_delimiter = true;
}
} else {
// XX1 print("remembering: "+mystr);
// XX1 this.state.sys.print("remembering: "+mystr);
this.state.tmp.last_primary_names_string = mystr;
// XXXXX A little more precision would be nice.
// This will clobber variable="author editor" as well as variable="author".
@ -20879,7 +20920,7 @@ CSL.Util.outputNumericField = function(state, varname, itemID) {
CSL.UPDATE_GROUP_CONTEXT_CONDITION(state, masterStyling.strings.prefix, null, masterStyling, `${num.particle}${num.value}`);
if (num.collapsible) {
var blob;
if (num.value.match(/^[1-9][0-9]*$/)) {
if (num.value.match(/^[1-9][0-9]*$/) && Number.isSafeInteger(parseInt(num.value, 10))) {
blob = new CSL.NumericBlob(state, num.particle, parseInt(num.value, 10), numStyling, itemID);
} else {
blob = new CSL.NumericBlob(state, num.particle, num.value, numStyling, itemID);
@ -20913,7 +20954,7 @@ CSL.Util.outputNumericField = function(state, varname, itemID) {
CSL.Util.PageRangeMangler = {};
CSL.Util.PageRangeMangler.getFunction = function (state, rangeType) {
var rangerex, pos, len, stringify, listify, expand, minimize, minimize_internal, chicago, lst, m, b, e, ret, begin, end, ret_func;
var rangerex, pos, len, stringify, listify, expand, minimize, minimize_internal, chicago15, chicago16, lst, m, b, e, ret, begin, end, ret_func;
var range_delimiter = state.getTerm(rangeType + "-range-delimiter");
@ -21021,7 +21062,7 @@ CSL.Util.PageRangeMangler.getFunction = function (state, rangeType) {
return ret.join("");
};
chicago = function (lst) {
chicago15 = function (lst) {
len = lst.length;
for (pos = 1; pos < len; pos += 2) {
if ("object" === typeof lst[pos]) {
@ -21041,6 +21082,31 @@ CSL.Util.PageRangeMangler.getFunction = function (state, rangeType) {
return stringify(lst);
};
chicago16 = function (lst) {
len = lst.length;
for (pos = 1; pos < len; pos += 2) {
if ("object" === typeof lst[pos]) {
m = lst[pos];
begin = parseInt(m[1], 10);
end = parseInt(m[3], 10);
e = "" + end;
if (begin > 100 && begin % 100) {
for (var i = 2; i < e.length; i++) {
var divisor = Math.pow(10, i);
if (Math.floor(begin / divisor) === Math.floor(end / divisor)) {
m[3] = "" + (end % divisor);
break;
}
}
}
}
if (m[2].slice(1) === m[0]) {
m[2] = range_delimiter;
}
}
return stringify(lst);
};
//
// The top-level option handlers.
//
@ -21070,7 +21136,15 @@ CSL.Util.PageRangeMangler.getFunction = function (state, rangeType) {
};
} else if (state.opt[rangeType + "-range-format"] === "chicago") {
ret_func = function (str) {
return sniff(str, chicago);
return sniff(str, chicago15);
};
} else if (state.opt[rangeType + "-range-format"] === "chicago-15") {
ret_func = function (str) {
return sniff(str, chicago15);
};
} else if (state.opt[rangeType + "-range-format"] === "chicago-16") {
ret_func = function (str) {
return sniff(str, chicago16);
};
}
@ -21668,7 +21742,7 @@ CSL.Output.Formatters = (function () {
var rexNameStr = "(?:[-\\s]*<\\/*(?:span\s+class=\"no(?:case|decor)\"|i|sc|b|sub|sup)>[-\\s]*|[-\\s]+)";
var nameDoppel = new CSL.Doppeler(rexNameStr);
var wordDoppel = new CSL.Doppeler("(?:[\u0020\u00A0\u2000-\u200B\u205F\u3000]+)");
var wordDoppel = new CSL.Doppeler("(?:[\u00A0\u0020\u00A0\u2000-\u200B\u205F\u3000]+)");
/**
* INTERNAL
@ -21941,7 +22015,6 @@ CSL.Output.Formatters = (function () {
quoteState: [],
capitaliseWords: function(str, i, followingTag) {
if (str.trim()) {
var words = str.split(/[ \u00A0]+/);
var wordle = wordDoppel.split(str);
var words = wordle.strings;
for (var j=0,jlen=words.length;j<jlen;j++) {
@ -21949,17 +22022,23 @@ CSL.Output.Formatters = (function () {
if (!word) {
continue;
}
if (word.length > 1 && !CSL.toLocaleLowerCase.call(state, word).match(config.skipWordsRex)) {
let lcase = CSL.toLocaleLowerCase.call(state, word);
let capitalize = false;
if (word.length > 1 && !lcase.match(config.skipWordsRex)) {
// Capitalize every word that is not a stop-word
words[j] = _capitalise.call(state, words[j]);
capitalize = true;
} else if (j === (words.length - 1) && followingTag === "-") {
words[j] = _capitalise.call(state, words[j]);
capitalize = true;
} else if (config.isFirst) {
// Capitalize first word, even if a stop-word
words[j] = _capitalise.call(state, words[j]);
capitalize = true;
} else if (config.afterPunct) {
// Capitalize after punctuation
words[j] = _capitalise.call(state, words[j]);
capitalize = true;
}
// Don't capitalize if word already contains capitalization
if (capitalize && word === lcase) {
words[j] = _capitalise.call(state, word);
}
config.afterPunct = false;
config.isFirst = false;
@ -21989,18 +22068,22 @@ CSL.Output.Formatters = (function () {
var config = {
quoteState: [],
capitaliseWords: function(str) {
var words = str.split(" ");
var wordle = wordDoppel.split(str);
var words = wordle.strings;
for (var i=0,ilen=words.length;i<ilen;i++) {
var word = words[i];
if (word) {
if (config.isFirst) {
words[i] = _capitalise.call(state, word);
// Don't capitalize if word already contains capitalization
if (word === CSL.toLocaleLowerCase.call(state, word)) {
words[i] = _capitalise.call(state, word);
}
config.isFirst = false;
break;
}
}
}
return words.join(" ");
return wordDoppel.join(wordle);
},
skipWordsRex: null,
tagState: [],
@ -22020,14 +22103,18 @@ CSL.Output.Formatters = (function () {
var config = {
quoteState: [],
capitaliseWords: function(str) {
var words = str.split(" ");
var wordle = wordDoppel.split(str);
var words = wordle.strings;
for (var i=0,ilen=words.length;i<ilen;i++) {
var word = words[i];
if (word) {
words[i] = _capitalise.call(state, word);
// Don't capitalize if word already contains capitalization
if (word === CSL.toLocaleLowerCase.call(state, word)) {
words[i] = _capitalise.call(state, word);
}
}
}
return words.join(" ");
return wordDoppel.join(wordle);
},
skipWordsRex: null,
tagState: [],
@ -22630,7 +22717,7 @@ CSL.Output.Formats.prototype.latex = {
return text;
},
"bibstart": "\\begin{thebibliography}{4}",
"bibend": "\end{thebibliography}",
"bibend": "\\end{thebibliography}",
"@font-style/italic": "{\\em %%STRING%%}",
"@font-style/oblique": false,
"@font-style/normal": false,
@ -23535,6 +23622,11 @@ CSL.Registry.NameReg = function (state) {
set_keys = function (state, itemid, nameobj) {
pkey = strip_periods(nameobj.family);
if (state.opt["demote-non-dropping-particle"] === "never" && nameobj["non-dropping-particle"] && nameobj["family"]) {
pkey = `${pkey} ${nameobj["non-dropping-particle"]}`;
}
skey = strip_periods(nameobj.given);
// Drop lowercase suffixes (such as et al.) from given name field
// for disambiguation purposes.
@ -23746,12 +23838,10 @@ CSL.Registry.NameReg = function (state) {
&& pos !== 0) {
return;
}
// A hack. Safe if the name object is used only here, for disambiguation purposes.
// TEMP: Disabled due to https://github.com/Juris-M/citeproc-js/issues/179
/*if (state.opt["demote-non-dropping-particle"] === "never" && nameobj["non-dropping-particle"] && nameobj["family"]) {
nameobj["family"] = nameobj["non-dropping-particle"] + " " + nameobj["family"];
}*/
/*
*/
//CSL.debug("INS");
set_keys(this.state, "" + item_id, nameobj);
@ -23853,7 +23943,7 @@ CSL.Disambiguation.prototype.run = function(akey) {
}
//SNIP-START
if (this.debug) {
print("[A] === RUN ===");
this.state.sys.print("[A] === RUN ===");
}
//SNIP-END
this.akey = akey;
@ -23867,7 +23957,7 @@ CSL.Disambiguation.prototype.runDisambig = function () {
var ismax;
//SNIP-START
if (this.debug) {
print("[C] === runDisambig() ===");
this.state.sys.print("[C] === runDisambig() ===");
}
//SNIP-END
this.initGivens = true;
@ -23896,7 +23986,7 @@ CSL.Disambiguation.prototype.scanItems = function (list) {
var pos, len, otherItem;
//SNIP-START
if (this.debug) {
print("[2] === scanItems() ===");
this.state.sys.print("[2] === scanItems() ===");
}
//SNIP-END
@ -23915,15 +24005,15 @@ CSL.Disambiguation.prototype.scanItems = function (list) {
//SNIP-START
if (this.debug) {
if (pos > 1) {
print(" -----------");
this.state.sys.print(" -----------");
}
}
//SNIP-END
if (this.ItemCite === otherItemCite) {
//SNIP-START
if (this.debug) {
print(" [CLASH]--> "+this.Item.id+": "+this.ItemCite);
print(" "+otherItem.id+": "+otherItemCite);
this.state.sys.print(" [CLASH]--> "+this.Item.id+": "+this.ItemCite);
this.state.sys.print(" "+otherItem.id+": "+otherItemCite);
}
//SNIP-END
clashes += 1;
@ -23931,8 +24021,8 @@ CSL.Disambiguation.prototype.scanItems = function (list) {
} else {
//SNIP-START
if (this.debug) {
print(" [clear]--> "+this.Item.id+": "+this.ItemCite);
print(" "+otherItem.id+": "+otherItemCite);
this.state.sys.print(" [clear]--> "+this.Item.id+": "+this.ItemCite);
this.state.sys.print(" "+otherItem.id+": "+otherItemCite);
}
//SNIP-END
this.nonpartners.push(otherItem);
@ -23958,9 +24048,9 @@ CSL.Disambiguation.prototype.disNames = function (ismax) {
//SNIP-START
if (this.debug) {
print("[3] == disNames() ==");
//print(" partners: "+[this.partners[i].id for (i in this.partners)].join(", "));
//print(" nonpartners: "+[this.nonpartners[i].id for (i in this.nonpartners)].join(", "));
this.state.sys.print("[3] == disNames() ==");
//this.state.sys.print(" partners: "+[this.partners[i].id for (i in this.partners)].join(", "));
//this.state.sys.print(" nonpartners: "+[this.nonpartners[i].id for (i in this.nonpartners)].join(", "));
}
//SNIP-END
@ -23988,8 +24078,8 @@ CSL.Disambiguation.prototype.disNames = function (ismax) {
this.captureStepToBase();
//SNIP-START
if (this.debug) {
print(" ** RESOLUTION [a]: lone partner, one nonpartner");
print(" registering "+this.partners[0].id+" and "+this.nonpartners[0].id);
this.state.sys.print(" ** RESOLUTION [a]: lone partner, one nonpartner");
this.state.sys.print(" registering "+this.partners[0].id+" and "+this.nonpartners[0].id);
}
//SNIP-END
this.state.registry.registerAmbigToken(this.akey, "" + this.nonpartners[0].id, this.betterbase);
@ -23999,8 +24089,8 @@ CSL.Disambiguation.prototype.disNames = function (ismax) {
this.captureStepToBase();
//SNIP-START
if (this.debug) {
print(" ** RESOLUTION [b]: lone partner, unknown number of remaining nonpartners");
print(" registering "+this.partners[0].id);
this.state.sys.print(" ** RESOLUTION [b]: lone partner, unknown number of remaining nonpartners");
this.state.sys.print(" registering "+this.partners[0].id);
}
//SNIP-END
this.state.registry.registerAmbigToken(this.akey, "" + this.partners[0].id, this.betterbase);
@ -24012,8 +24102,8 @@ CSL.Disambiguation.prototype.disNames = function (ismax) {
this.captureStepToBase();
//SNIP-START
if (this.debug) {
print(" ** RESOLUTION [c]: lone nonpartner, unknown number of partners remaining");
print(" registering "+this.nonpartners[0].id);
this.state.sys.print(" ** RESOLUTION [c]: lone nonpartner, unknown number of partners remaining");
this.state.sys.print(" registering "+this.nonpartners[0].id);
}
//SNIP-END
this.state.registry.registerAmbigToken(this.akey, "" + this.nonpartners[0].id, this.betterbase);
@ -24023,7 +24113,7 @@ CSL.Disambiguation.prototype.disNames = function (ismax) {
this.captureStepToBase();
//SNIP-START
if (this.debug) {
print(" ** RESOLUTION [d]: better result, but no entries safe to register");
this.state.sys.print(" ** RESOLUTION [d]: better result, but no entries safe to register");
}
//SNIP-END
this.lists[this.listpos] = [this.betterbase, this.partners];
@ -24031,7 +24121,7 @@ CSL.Disambiguation.prototype.disNames = function (ismax) {
} else {
//SNIP-START
if (this.debug) {
print(" ** RESOLUTION [e]: no improvement, and clashes remain");
this.state.sys.print(" ** RESOLUTION [e]: no improvement, and clashes remain");
}
//SNIP-END
if (ismax) {
@ -24040,7 +24130,7 @@ CSL.Disambiguation.prototype.disNames = function (ismax) {
if (this.modeindex === this.modes.length - 1) {
//SNIP-START
if (this.debug) {
print(" (registering clashing entries because we've run out of options)");
this.state.sys.print(" (registering clashing entries because we've run out of options)");
}
//SNIP-END
for (var i = 0, ilen = this.partners.length; i < ilen; i += 1) {
@ -24055,7 +24145,7 @@ CSL.Disambiguation.prototype.disNames = function (ismax) {
CSL.Disambiguation.prototype.disExtraText = function () {
//SNIP-START
if (this.debug) {
print("[3] === disExtraText ==");
this.state.sys.print("[3] === disExtraText ==");
}
//SNIP-END
@ -24117,7 +24207,7 @@ CSL.Disambiguation.prototype.disYears = function () {
var pos, len, tokens, token;
//SNIP-START
if (this.debug) {
print("[3] === disYears ==");
this.state.sys.print("[3] === disYears ==");
}
//SNIP-END
tokens = [];
@ -24153,7 +24243,7 @@ CSL.Disambiguation.prototype.disYears = function () {
CSL.Disambiguation.prototype.incrementDisambig = function () {
//SNIP-START
if (this.debug) {
print("\n[1] === incrementDisambig() ===");
this.state.sys.print("\n[1] === incrementDisambig() ===");
}
//SNIP-END
if (this.initGivens) {
@ -24217,20 +24307,20 @@ CSL.Disambiguation.prototype.incrementDisambig = function () {
}
//SNIP-START
if (this.debug) {
print(" ------------------");
print(" incremented values");
print(" ------------------");
print(" | gnameset: "+this.gnameset);
print(" | gname: "+this.gname);
print(" | names value: "+this.base.names[this.gnameset]);
this.state.sys.print(" ------------------");
this.state.sys.print(" incremented values");
this.state.sys.print(" ------------------");
this.state.sys.print(" | gnameset: "+this.gnameset);
this.state.sys.print(" | gname: "+this.gname);
this.state.sys.print(" | names value: "+this.base.names[this.gnameset]);
if (this.base.givens.length) {
print(" | givens value: "+this.base.givens[this.gnameset][this.gname]);
this.state.sys.print(" | givens value: "+this.base.givens[this.gnameset][this.gname]);
} else {
print(" | givens value: nil");
this.state.sys.print(" | givens value: nil");
}
print(" | namesetsMax: "+this.namesetsMax);
print(" | namesMax: "+this.namesMax);
print(" | givensMax: "+this.givensMax);
this.state.sys.print(" | namesetsMax: "+this.namesetsMax);
this.state.sys.print(" | namesMax: "+this.namesMax);
this.state.sys.print(" | givensMax: "+this.givensMax);
}
//SNIP-END
if (("number" !== typeof this.namesetsMax || this.namesetsMax === -1 || this.gnameset === this.namesetsMax)
@ -24241,7 +24331,7 @@ CSL.Disambiguation.prototype.incrementDisambig = function () {
maxed = true;
//SNIP-START
if (this.debug) {
print(" MAXED");
this.state.sys.print(" MAXED");
}
//SNIP-END
}
@ -24256,7 +24346,7 @@ CSL.Disambiguation.prototype.initVars = function (akey) {
var i, ilen, myIds, myItemBundles, myItems;
//SNIP-START
if (this.debug) {
print("[B] === initVars() ===");
this.state.sys.print("[B] === initVars() ===");
}
//SNIP-END
this.lists = [];