Capitalize "Aunt Sarah"

This commit is contained in:
Domenic Denicola 2020-12-19 16:55:34 -05:00
commit 1a0780bd7b

View file

@ -554,6 +554,9 @@ function fixCapitalization(xml, book) {
xml = xml.replace(/(?<!mom), dad(?![a-z])/g, ", Dad");
xml = xml.replace(/, mom(?![a-z-])/g, ", Mom");
// Similarly, specific aunts and uncles get capitalized when used as a title. This one is often missed.
xml = xml.replace(/aunt Sarah/g, "Aunt Sarah");
// The majority of "Wardens headquarters" is lowercased, and always prefixed with "the", indicating it's not a proper
// place name. So we remove the capitalization in the few places where it does appear.
xml = xml.replace(/Wardens Headquarters/g, "Wardens headquarters");