Skip to content

Commit

Permalink
Fix Sifara, Thanda, and Yàngban
Browse files Browse the repository at this point in the history
Closes #1.
  • Loading branch information
domenic committed Aug 13, 2017
1 parent a27b8a6 commit 12086f2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 12086f2

Please sign in to comment.