Fix the capitalization of "Dad" when used as a name

This commit is contained in:
Domenic Denicola 2020-10-17 20:17:31 -04:00
commit 697f8a76ea
3 changed files with 271 additions and 1 deletions

View file

@ -393,6 +393,10 @@ function getBodyXML(chapter, contentEl) {
// "gray" is the majority spelling, except for "greyhound"
xml = xml.replace(/(G|g)rey(?!hound)/g, "$1ray");
// "Dad" should be capitalized when used as a proper name. This regexp catches a good amount of instances, without
// over-correcting.
xml = xml.replace(/(?<!mom), dad(?![a-z])/g, ", Dad");
// These are consistently missing hyphens.
xml = xml.replace(/self destruct/g, "self-destruct");
xml = xml.replace(/life threatening/g, "life-threatening");