From d4663ed2e34794d55eb4109badc9dc1f43930b3d Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Thu, 31 Dec 2020 13:53:11 -0500 Subject: [PATCH] Replace WordPress s with emoji Noticed via the validation discussed in #22, which was failing on the draggable attribute. --- lib/convert-worker.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/convert-worker.js b/lib/convert-worker.js index 5b1f4a0..2432474 100644 --- a/lib/convert-worker.js +++ b/lib/convert-worker.js @@ -243,6 +243,12 @@ function getBodyXML(chapter, book, contentEl) { xml = xml.replace(/ ? <\/p>/g, "

"); xml = xml.replace(/([a-z]) ,/g, "$1,"); + // Use actual emojis instead of images + xml = xml.replace( + // eslint-disable-next-line max-len + /O_o/g, + "🤨"); + xml = fixTruncatedWords(xml); xml = fixDialogueTags(xml); xml = fixForeignNames(xml);