Fix Sifara, Thanda, and Yàngban

Closes #1.
This commit is contained in:
Domenic Denicola 2017-08-13 16:07:55 -04:00
commit 12086f209c

View file

@ -195,6 +195,14 @@ function getBodyXML(chapter, contentEl) {
// it's incorrect to capitalize in the one-off fixes.
xml = xml.replace(/the clairvoyant/g, "the Clairvoyant");
// This is consistently missing accents
xml = xml.replace(/Yangban/g, "Yàngbǎn");
// These are usually not italicized, but sometimes are. Other foreign-language names (like Yàngbǎn) are not
// italicized, so we go in the direction of removing the italics.
xml = xml.replace(/<em>Thanda<\/em>/g, "Thanda");
xml = xml.replace(/<em>Sifara([^<]*)<\/em>/g, "Sifara$1");
// One-off fixes
(substitutions[chapter.url] || []).forEach(substitution => {
const indexOf = xml.indexOf(substitution.before);