Always capitalize "Nazi"
Also fix hyphenation and capitalization around "neo-Nazi".
This commit is contained in:
parent
06c7b3adf2
commit
60709f54c2
1 changed files with 9 additions and 0 deletions
|
|
@ -505,6 +505,12 @@ function fixCapitalization(xml, book) {
|
|||
// place name. So we remove the capitalization in the few places where it does appear.
|
||||
xml = xml.replace(/Wardens’ Headquarters/g, "Wardens’ headquarters");
|
||||
|
||||
// Some style guides try to reserve capitalized "Nazi" for historical discussions of members of the Nazi party. This
|
||||
// seems fuzzy when it comes to phrases like "neo-Nazi", and doesn't seem to be what the author is doing; the books
|
||||
// are just plain inconsistent. So, let's standardize on always uppercasing.
|
||||
xml = xml.replace(/(?<![a-z])nazi/g, "Nazi");
|
||||
xml = xml.replace(/ Neo-/g, " neo-");
|
||||
|
||||
return xml;
|
||||
}
|
||||
|
||||
|
|
@ -534,6 +540,9 @@ function fixHyphens(xml) {
|
|||
xml = xml.replace(/well armed/g, "well-armed");
|
||||
xml = xml.replace(/able bodied/g, "able-bodied");
|
||||
|
||||
// This is usually correct but sometimes wrong.
|
||||
xml = xml.replace(/neo /g, "neo-");
|
||||
|
||||
return xml;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue