From 79efec7080823b4ba34e09cf615b615738ca73ab Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Sun, 29 Nov 2020 15:45:28 -0500 Subject: [PATCH] Fix end-of-line commas that should be periods. --- lib/convert-worker.js | 2 ++ lib/substitutions.json | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/convert-worker.js b/lib/convert-worker.js index dd59cfd..f781647 100644 --- a/lib/convert-worker.js +++ b/lib/convert-worker.js @@ -203,6 +203,8 @@ function getBodyXML(chapter, book, contentEl) { xml = xml.replace(/‘([Kk])ay(?!’)/g, "’$1ay"); xml = xml.replace(/(Why|What|Who|How|Where|When)<\/em>\?/g, "$1?"); xml = xml.replace(/,<\/em>/g, ","); + xml = xml.replace(/,”<\/p>/g, ".”

"); + xml = xml.replace(/

(.*),<\/p>/g, "

$1.

"); // Similar problems occur in Ward with and as do in Worm with s xml = xml.replace(//g, ""); diff --git a/lib/substitutions.json b/lib/substitutions.json index a74c262..3ab3573 100644 --- a/lib/substitutions.json +++ b/lib/substitutions.json @@ -3967,10 +3967,6 @@ "before": "‘lowed to do that, ‘miright", "after": "’lowed to do that, ’miright" }, - { - "before": "path was clear,", - "after": "path was clear." - }, { "before": "hard, don’t you?", "after": "hard, don’t you?" @@ -6229,6 +6225,10 @@ { "before": "Foil-Hookline", "after": "Foil–Hookline" + }, + { + "before": "“Fired through a hole I made in my fist.

", + "after": "“Fired through a hole I made in my fist.”

" } ], "https://www.parahumans.net/2019/02/05/blinding-11-12/": [