From d4f009d67cc6ca2e5be4ed88cf766efe861aee5f Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Fri, 16 Aug 2019 23:19:45 -0400 Subject: [PATCH] Fix "grey" to "gray" (occurs four times) Closes #11. --- lib/convert.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/convert.js b/lib/convert.js index 3ea76c5..5233518 100644 --- a/lib/convert.js +++ b/lib/convert.js @@ -337,6 +337,9 @@ function getBodyXML(chapter, contentEl) { // Clich(e|é) is spelled both ways. Let's standardize on including the accent. xml = xml.replace(/cliche/g, "cliché"); + // "gray" is the majority spelling, except for "greyhound" + xml = xml.replace(/(G|g)rey(?!hound)/g, "$1ray"); + // These are consistently missing hyphens. xml = xml.replace(/self destruct/g, "self-destruct"); xml = xml.replace(/life threatening/g, "life-threatening");