Capitalize "Uncle Neil" and "Aunt Fleur"

This commit is contained in:
Domenic Denicola 2020-12-25 16:01:21 -05:00
commit e1b59994f8

View file

@ -559,8 +559,10 @@ 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.
// Similarly, specific aunts and uncles get capitalized when used as a title. These are often missed.
xml = xml.replace(/aunt Sarah/g, "Aunt Sarah");
xml = xml.replace(/aunt Fleur/g, "Aunt Fleur");
xml = xml.replace(/uncle Neil/g, "Uncle Neil");
// 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.