From dd2b5b15ce67bf33a48f400a2cacce57061f78c7 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Sat, 31 Oct 2020 17:53:32 -0400 Subject: [PATCH] Fix instances of "The clairvoyant" Previously we only fixed "the clairvoyant", missing cases where it his name started sentences. --- lib/convert-worker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/convert-worker.js b/lib/convert-worker.js index 086745d..4d33ecf 100644 --- a/lib/convert-worker.js +++ b/lib/convert-worker.js @@ -329,7 +329,7 @@ function getBodyXML(chapter, book, contentEl) { // This occurs enough times it's better to do here than in one-off fixes. We correct the single instance where // it's incorrect to capitalize in the one-off fixes. // Note that Ward contains much talk of "the clairvoyants", so we don't want to capitalize plurals. - xml = xml.replace(/the clairvoyant([^s])/g, "the Clairvoyant$1"); + xml = xml.replace(/([Tt])he clairvoyant([^s])/g, "$1he Clairvoyant$2"); // ReSound's name is sometimes miscapitalized. The word is never used in a non-name context. xml = xml.replace(/Resound/g, "ReSound");