parent
488c4eb72b
commit
8997ba06c1
|
@ -80,7 +80,7 @@ if (!Array.indexOf) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
var CSL = {
|
var CSL = {
|
||||||
PROCESSOR_VERSION: "1.1.58",
|
PROCESSOR_VERSION: "1.1.60",
|
||||||
CONDITION_LEVEL_TOP: 1,
|
CONDITION_LEVEL_TOP: 1,
|
||||||
CONDITION_LEVEL_BOTTOM: 2,
|
CONDITION_LEVEL_BOTTOM: 2,
|
||||||
PLAIN_HYPHEN_REGEX: /(?:[^\\]-|\u2013)/,
|
PLAIN_HYPHEN_REGEX: /(?:[^\\]-|\u2013)/,
|
||||||
|
@ -5367,7 +5367,7 @@ CSL.Node.date = {
|
||||||
dp = [];
|
dp = [];
|
||||||
if (this.variables.length
|
if (this.variables.length
|
||||||
&& !(state.tmp.just_looking
|
&& !(state.tmp.just_looking
|
||||||
&& this.variables[0] !== "issued")) {
|
&& this.variables[0] === "accessed")) {
|
||||||
state.parallel.StartVariable(this.variables[0]);
|
state.parallel.StartVariable(this.variables[0]);
|
||||||
date_obj = Item[this.variables[0]];
|
date_obj = Item[this.variables[0]];
|
||||||
if ("undefined" === typeof date_obj) {
|
if ("undefined" === typeof date_obj) {
|
||||||
|
@ -14690,32 +14690,38 @@ CSL.parseParticles = function(){
|
||||||
idx = nameObj.given.indexOf(m[1]);
|
idx = nameObj.given.indexOf(m[1]);
|
||||||
var possible_suffix = nameObj.given.slice(idx + m[1].length);
|
var possible_suffix = nameObj.given.slice(idx + m[1].length);
|
||||||
var possible_comma = nameObj.given.slice(idx, idx + m[1].length).replace(/\s*/g, "");
|
var possible_comma = nameObj.given.slice(idx, idx + m[1].length).replace(/\s*/g, "");
|
||||||
if (possible_suffix.length <= 3) {
|
if (possible_suffix.replace(/\./g, "") === 'et al' && !nameObj["dropping-particle"]) {
|
||||||
|
nameObj["dropping-particle"] = possible_suffix;
|
||||||
|
nameObj["comma-dropping-particle"] = ",";
|
||||||
|
} else {
|
||||||
if (possible_comma.length === 2) {
|
if (possible_comma.length === 2) {
|
||||||
nameObj["comma-suffix"] = true;
|
nameObj["comma-suffix"] = true;
|
||||||
}
|
}
|
||||||
nameObj.suffix = possible_suffix;
|
nameObj.suffix = possible_suffix;
|
||||||
} else if (!nameObj["dropping-particle"] && nameObj.given) {
|
|
||||||
nameObj["dropping-particle"] = possible_suffix;
|
|
||||||
nameObj["comma-dropping-particle"] = ",";
|
|
||||||
}
|
}
|
||||||
nameObj.given = nameObj.given.slice(0, idx);
|
nameObj.given = nameObj.given.slice(0, idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return function(nameObj) {
|
return function(nameObj) {
|
||||||
[hasLastParticle, lastNameValue, lastParticleList] = splitParticles(nameObj.family);
|
var res = splitParticles(nameObj.family);
|
||||||
|
var hasLastParticle = res[0];
|
||||||
|
var lastNameValue = res[1];
|
||||||
|
var lastParticleList = res[2];
|
||||||
nameObj.family = lastNameValue;
|
nameObj.family = lastNameValue;
|
||||||
var nonDroppingParticle = trimLast(lastParticleList.join(""));
|
var nonDroppingParticle = trimLast(lastParticleList.join(""));
|
||||||
if (nonDroppingParticle) {
|
if (nonDroppingParticle) {
|
||||||
nameObj['non-dropping-particle'] = nonDroppingParticle;
|
nameObj['non-dropping-particle'] = nonDroppingParticle;
|
||||||
}
|
}
|
||||||
[hasFirstParticle, firstNameValue, firstParticleList] = splitParticles(nameObj.given, true);
|
parseSuffix(nameObj);
|
||||||
|
var res = splitParticles(nameObj.given, true);
|
||||||
|
var hasFirstParticle = res[0];
|
||||||
|
var firstNameValue = res[1];
|
||||||
|
var firstParticleList = res[2];
|
||||||
nameObj.given = firstNameValue;
|
nameObj.given = firstNameValue;
|
||||||
var droppingParticle = firstParticleList.join("").trim();
|
var droppingParticle = firstParticleList.join("").trim();
|
||||||
if (droppingParticle) {
|
if (droppingParticle) {
|
||||||
nameObj['dropping-particle'] = droppingParticle;
|
nameObj['dropping-particle'] = droppingParticle;
|
||||||
}
|
}
|
||||||
parseSuffix(nameObj);
|
|
||||||
}
|
}
|
||||||
}();
|
}();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user