Skip to content

Commit

Permalink
Reproduce discourse#1843
Browse files Browse the repository at this point in the history
  • Loading branch information
zepinglee committed Mar 23, 2024
1 parent 59fbf78 commit c8e02b7
Show file tree
Hide file tree
Showing 4 changed files with 788 additions and 21 deletions.
13 changes: 6 additions & 7 deletions citeproc.js
Expand Up @@ -22853,10 +22853,10 @@ CSL.Registry = function (state) {
// See CSL.NameOutput.prototype.outputNames
// and CSL.Registry.prototype.doinserts
this.authorstrings = {};

// for parallel delimiter support
this.masterMap = {};

//
// shared scratch vars
this.mylist = [];
Expand Down Expand Up @@ -23401,7 +23401,7 @@ CSL.Registry.prototype._locationOf = function(element, array, start, end) {
start = start || 0;
end = end || array.length;
var pivot = (start + end) >> 1; // should be faster than dividing by 2

var c = this.sorter.compareKeys(element, array[pivot]);
if (end - start <= 1) {
return c == -1 ? pivot - 1 : pivot;
Expand Down Expand Up @@ -23586,18 +23586,17 @@ CSL.getSortKeys = function (Item, key_type) {
this[key_type].keys[pos] = strip_prepositions(this[key_type].keys[pos]);
}
//SNIP-START
if (false) {
// if (false) {
CSL.debug("sort keys (" + key_type + "): " + this[key_type].keys);
}
// }
//SNIP-END

this.tmp.area = area;
this.tmp.root = root;
this.tmp.extension = extension;
return this[key_type].keys;
};


/*global CSL: true */

CSL.Registry.NameReg = function (state) {
Expand Down
13 changes: 6 additions & 7 deletions citeproc_commonjs.js
Expand Up @@ -22853,10 +22853,10 @@ CSL.Registry = function (state) {
// See CSL.NameOutput.prototype.outputNames
// and CSL.Registry.prototype.doinserts
this.authorstrings = {};

// for parallel delimiter support
this.masterMap = {};

//
// shared scratch vars
this.mylist = [];
Expand Down Expand Up @@ -23401,7 +23401,7 @@ CSL.Registry.prototype._locationOf = function(element, array, start, end) {
start = start || 0;
end = end || array.length;
var pivot = (start + end) >> 1; // should be faster than dividing by 2

var c = this.sorter.compareKeys(element, array[pivot]);
if (end - start <= 1) {
return c == -1 ? pivot - 1 : pivot;
Expand Down Expand Up @@ -23586,18 +23586,17 @@ CSL.getSortKeys = function (Item, key_type) {
this[key_type].keys[pos] = strip_prepositions(this[key_type].keys[pos]);
}
//SNIP-START
if (false) {
// if (false) {
CSL.debug("sort keys (" + key_type + "): " + this[key_type].keys);
}
// }
//SNIP-END

this.tmp.area = area;
this.tmp.root = root;
this.tmp.extension = extension;
return this[key_type].keys;
};


/*global CSL: true */

CSL.Registry.NameReg = function (state) {
Expand Down

0 comments on commit c8e02b7

Please sign in to comment.