De-capitalize "corona pollentia" and friends

This commit is contained in:
Domenic Denicola 2020-11-29 17:08:31 -05:00
commit 54f2f82650

View file

@ -493,6 +493,13 @@ function fixCapitalization(xml, book) {
// a compound noun or at the beginning of a sentence.
xml = xml.replace(/(?<! {2}|“|Cornell |Nilles )University(?! Road)/, "university");
// Organ names (e.g. brain, arm) or scientific names are not capitalized, so the "corona pollentia" and friends should
// not be either. The books are inconsistent.
xml = xml.replace(/(?<! {2}|“|-)Corona/g, "corona");
xml = xml.replace(/Pollentia/g, "pollentia");
xml = xml.replace(/Radiata/g, "radiata");
xml = xml.replace(/Gemma/g, "gemma");
// 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.