From 3905965134cdb7d42f0893a48031ab66570db25a Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Thu, 22 Oct 2020 22:50:11 -0400 Subject: [PATCH] Fix missing periods at the end of quotations --- lib/convert-worker.js | 1 + lib/substitutions.json | 74 +++++------------------------------------- 2 files changed, 10 insertions(+), 65 deletions(-) diff --git a/lib/convert-worker.js b/lib/convert-worker.js index 1a1e64d..a0a7528 100644 --- a/lib/convert-worker.js +++ b/lib/convert-worker.js @@ -179,6 +179,7 @@ function getBodyXML(chapter, contentEl) { xml = xml.replace(/'/g, "’"); xml = xml.replace(/’([A-Za-z]+)’/g, "‘$1’"); xml = xml.replace(/‘Sup/g, "’Sup"); + xml = xml.replace(/([a-z])”<\/p>/g, "$1.”

"); } // These interact with each other, so do them a few times. diff --git a/lib/substitutions.json b/lib/substitutions.json index c7cac21..6e78aa3 100644 --- a/lib/substitutions.json +++ b/lib/substitutions.json @@ -74,7 +74,7 @@ ], "https://parahumans.wordpress.com/2011/07/09/insinuation-2-2/": [ { - "before": "simply, “Bug”", + "before": "simply, “Bug.”", "after": "simply, ‘Bug’." }, { @@ -361,10 +361,6 @@ } ], "https://parahumans.wordpress.com/2011/10/29/shell-4-11/": [ - { - "before": "eyes, I see”", - "after": "eyes, I see.”" - }, { "before": "bugging the f-, uh", "after": "bugging the f—, uh" @@ -679,10 +675,6 @@ } ], "https://parahumans.wordpress.com/2012/01/28/buzz-7-4/": [ - { - "before": "on the way”", - "after": "on the way.”" - }, { "before": "better I’ll feel,” he was", "after": "better I’ll feel.” He was" @@ -693,10 +685,6 @@ } ], "https://parahumans.wordpress.com/2012/01/31/buzz-7-5/": [ - { - "before": "in force”", - "after": "in force.”" - }, { "before": "realized,” Brian spoke. “I", "after": "realized,” Brian spoke, “I" @@ -1751,10 +1739,6 @@ } ], "https://parahumans.wordpress.com/2012/06/05/infestation-11-6/": [ - { - "before": "we do here”", - "after": "we do here.”" - }, { "before": "&", "after": "and" @@ -2276,10 +2260,6 @@ { "before": "volunteered, asked
\n
to", "after": "volunteered, asked to" - }, - { - "before": "her father’s abilities”", - "after": "her father’s abilities.”" } ], "https://parahumans.wordpress.com/2012/10/25/interlude-15-donation-bonus-2/": [ @@ -2418,12 +2398,6 @@ "after": "that,” Grue said, “is" } ], - "https://parahumans.wordpress.com/2012/11/29/interlude-16-donation-bonus/": [ - { - "before": "in the darkness”", - "after": "in the darkness.”" - } - ], "https://parahumans.wordpress.com/2012/12/01/monarch-16-3/": [ { "before": "two teams” I said", @@ -2443,10 +2417,6 @@ } ], "https://parahumans.wordpress.com/2012/12/11/monarch-16-6/": [ - { - "before": "Lost in thought”", - "after": "Lost in thought.”" - }, { "before": "—But we definitely", "after": "—but we definitely" @@ -2513,10 +2483,6 @@ } ], "https://parahumans.wordpress.com/2013/01/05/monarch-16-13/": [ - { - "before": "word on both points”", - "after": "word on both points.”" - }, { "before": "doubts,” I said. “You", "after": "doubts,” I said, “you" @@ -3343,12 +3309,6 @@ "after": "And,” I said, “we" } ], - "https://parahumans.wordpress.com/2013/06/11/crushed-24-2/": [ - { - "before": "To Behemoth”", - "after": "To Behemoth.”" - } - ], "https://parahumans.wordpress.com/2013/06/15/crushed-24-3/": [ { "before": "Phir Sē echoed me. “", @@ -3507,10 +3467,6 @@ "before": "the other-.", "after": "the other—" }, - { - "before": "“Yeah”", - "after": "“Yeah.”" - }, { "before": "Vista,” he said. “Another", "after": "Vista,” he said, “another" @@ -3687,10 +3643,6 @@ } ], "https://parahumans.wordpress.com/2013/08/31/cockroaches-28-1/": [ - { - "before": "lot of supplies in”", - "after": "lot of supplies in.”" - }, { "before": "could save issue", "after": "could say issue" @@ -3799,10 +3751,6 @@ } ], "https://parahumans.wordpress.com/2013/09/17/interlude-28/": [ - { - "before": "“Password protected”", - "after": "“Password protected.”" - }, { "before": "Case fifty-threes", "after": "case fifty-threes" @@ -4213,10 +4161,6 @@ "before": "property of Nero", "after": "property of Nero" }, - { - "before": "“Stay, Hooligan”", - "after": "“Stay, Hooligan.”" - }, { "before": "Nero, Why don’t we get", "after": "Nero, why don’t we get" @@ -4243,10 +4187,6 @@ "before": "vageuly", "after": "vaguely" }, - { - "before": "standby”", - "after": "standby.”" - }, { "before": "minutes passed. the chance rose", "after": "minutes passed. The chance rose" @@ -4287,10 +4227,6 @@ "before": "the ‘cage", "after": "the ’cage" }, - { - "before": "camera follows”", - "after": "camera follows.”" - }, { "before": "background of his mind

", "after": "background of his mind.

" @@ -4663,6 +4599,10 @@ { "before": "Peaches and—You mean peachy", "after": "Peaches and— You mean peachy" + }, + { + "before": "Victoria” she", + "after": "Victoria,” she" } ], "https://www.parahumans.net/2018/03/20/shadow-5-7/": [ @@ -4799,6 +4739,10 @@ { "before": "wall of bodies. the woman behind", "after": "wall of bodies. The woman behind" + }, + { + "before": "dying, motherfuckers” the bearded", + "after": "dying, motherfuckers,” the bearded" } ], "https://www.parahumans.net/2018/04/24/pitch-6-4/": [