From 4091530bb2cf58cf5e40b9efe855787456407dd1 Mon Sep 17 00:00:00 2001
From: Domenic Denicola
Date: Sat, 17 Oct 2020 20:15:53 -0400
Subject: [PATCH] Fix some over-italicized periods
---
lib/convert.js | 2 +-
lib/substitutions.json | 26 --------------------------
2 files changed, 1 insertion(+), 27 deletions(-)
diff --git a/lib/convert.js b/lib/convert.js
index 2160a1f..4c94b6c 100644
--- a/lib/convert.js
+++ b/lib/convert.js
@@ -160,7 +160,7 @@ function getBodyXML(chapter, contentEl) {
xml = xml.replace(/“([^>]+)<\/em>(!|\?|\.)”/g, "“$1$2”");
xml = xml.replace(/([^>]+)<\/em>(!|\?|\.)<\/p>/g, "$1$2
");
xml = xml.replace(/(!|\?|\.)\s{2}<\/em><\/p>/g, "$1
");
- xml = xml.replace(/([a-z]+)\?<\/em>/g, "$1?");
+ xml = xml.replace(/([a-z]+)(\?|\.)<\/em>/g, "$1$2");
xml = xml.replace(/([^>]+?)( +)<\/em>/g, "$1$2");
xml = xml.replace(/ ([a-zA-Z]+)<\/em>/g, " $1");
xml = xml.replace(/‘\s*([^<]+)\s*’<\/em>/g, "‘$1’");
diff --git a/lib/substitutions.json b/lib/substitutions.json
index c879658..6036606 100644
--- a/lib/substitutions.json
+++ b/lib/substitutions.json
@@ -125,10 +125,6 @@
"before": "Brian said. “But",
"after": "Brian said, “but"
},
- {
- "before": "better.",
- "after": "better."
- },
{
"before": "he said. “So let’s",
"after": "he said, “so let’s"
@@ -873,10 +869,6 @@
"before": "CD-6.
",
"after": "CD-6."
},
- {
- "before": "pushing.",
- "after": "pushing."
- },
{
"before": "Narwhal,",
"after": "Narwhal,"
@@ -946,10 +938,6 @@
{
"before": "Negative.",
"after": "Negative."
- },
- {
- "before": "up.",
- "after": "up."
}
],
"https://parahumans.wordpress.com/2012/03/17/extermination-8-5/": [
@@ -2024,12 +2012,6 @@
"after": "hon,” Celia said, “we’ve"
}
],
- "https://parahumans.wordpress.com/2012/08/11/snare-13-5/": [
- {
- "before": "similar.",
- "after": "similar."
- }
- ],
"https://parahumans.wordpress.com/2012/08/14/snare-13-6/": [
{
"before": "Grue,” Trickster said. “Get",
@@ -2507,10 +2489,6 @@
}
],
"https://parahumans.wordpress.com/2013/01/19/queen-18-1/": [
- {
- "before": "untrustworthy.",
- "after": "untrustworthy."
- },
{
"before": "know,” Tattletale said. “But",
"after": "know,” Tattletale said, “but"
@@ -2669,10 +2647,6 @@
{
"before": "better,” I said. “Eidolon",
"after": "better,” I said, “Eidolon"
- },
- {
- "before": "giving her us.",
- "after": "giving her us."
}
],
"https://parahumans.wordpress.com/2013/02/14/interlude-18-donation-bonus-4/": [