Standardize on "Amias", not "Amais"

This commit is contained in:
Domenic Denicola 2020-11-14 18:41:39 -05:00
commit 584a52fc27
2 changed files with 12 additions and 7 deletions

View file

@ -228,12 +228,10 @@ function getBodyXML(chapter, book, contentEl) {
xml = xml.replace(/ ? <\/p>/g, "</p>");
xml = xml.replace(/([a-z]) ,/g, "$1,");
// 197 instances of "Mrs." to 21 of "Ms."
xml = xml.replace(/Ms\. Yamada/g, "Mrs. Yamada");
xml = fixTruncatedWords(xml);
xml = fixDialogueTags(xml);
xml = fixForeignNames(xml);
xml = standardizeNames(xml);
xml = fixEmDashes(xml);
xml = enDashJointNames(xml);
xml = fixPossessives(xml);
@ -330,6 +328,16 @@ function fixForeignNames(xml) {
return xml;
}
function standardizeNames(xml) {
// 197 instances of "Mrs." to 21 of "Ms."
xml = xml.replace(/Ms\. Yamada/g, "Mrs. Yamada");
// 25 instances of "Amias" to 3 of "Amais"
xml = xml.replace(/Amais/g, "Amias");
return xml;
}
function fixEmDashes(xml) {
xml = xml.replace(/ /g, "—");
xml = xml.replace(/“((?:<em>)?)-/g, "“$1—");
@ -417,6 +425,7 @@ function fixPossessives(xml) {
xml = xml.replace(/([^])Mrs. Sims([^s])/g, "$1Mrs. Simss$2");
xml = xml.replace(/([^])Ms. Stillons([^s])/g, "$1Ms. Stillonss$2");
xml = xml.replace(/([^])Chuckles([^s])/g, "$1Chuckless$2");
xml = xml.replace(/([^])Amias([^s])/g, "$1Amiass$2");
// This one is not just missing the extra "s"; it's often misplaced.
xml = xml.replace(/Wardens/g, "Wardens");

View file

@ -5970,10 +5970,6 @@
{
"before": "Rome-Romans",
"after": "Rome—Romans"
},
{
"before": "Amais",
"after": "Amaiss"
}
],
"https://www.parahumans.net/2018/12/18/blinding-11-1/": [