Remove overcapitalization of "university"

This commit is contained in:
Domenic Denicola 2020-11-14 18:54:02 -05:00
commit 8daeebe507

View file

@ -450,6 +450,10 @@ function fixCapitalization(xml, book) {
xml = xml.replace(/Halberd/g, "halberd");
xml = xml.replace(/Loft/g, "loft");
// There's no reason why university should be capitalized in most contexts, although sometimes it's used as part of
// a compound noun or at the beginning of a sentence.
xml = xml.replace(/(?<! {2}|“|Cornell |Nilles )University(?! Road)/, "university");
// Especially early in the story, PRT designations are capitalized; they should not be. This fixes the cases where we
// can be reasonably sure they don't start a sentence, although more specific instances are done in
// substitutions.json, and some need to be back-corrected.