diff --git a/lib/convert-worker.js b/lib/convert-worker.js index d90d750..63967ca 100644 --- a/lib/convert-worker.js +++ b/lib/convert-worker.js @@ -161,9 +161,9 @@ function getBodyXML(chapter, book, contentEl) { xml = xml.replace(/‘\s*([^<]+)\s*’<\/em>/g, "‘$1’"); xml = xml.replace(/‘\s*([^<]+)\s*<\/em>\s*’/g, "‘$1’"); xml = xml.replace(/‘\s*\s*([^<]+)\s*’<\/em>/g, "‘$1’"); - xml = xml.replace(/“\s*([^<]+)\s*”<\/em>/g, "“$1”"); - xml = xml.replace(/“\s*([^<]+)\s*<\/em>\s*”/g, "“$1”"); - xml = xml.replace(/“\s*\s*([^<]+)\s*”<\/em>/g, "“$1”"); + xml = xml.replace(/“\s*([^<”]+)\s*”<\/em>/g, "“$1”"); + xml = xml.replace(/“\s*([^<”]+)\s*<\/em>\s*”/g, "“$1”"); + xml = xml.replace(/“\s*\s*([^<”]+)\s*”<\/em>/g, "“$1”"); xml = xml.replace(/([^\n>]) ?/g, "$1 "); xml = xml.replace(/ ?<\/em>/g, " "); xml = xml.replace(/]+)> /g, ""); @@ -197,6 +197,8 @@ function getBodyXML(chapter, book, contentEl) { xml = xml.replace(/‘([^<]+)<\/em>‘/g, "‘$1’"); xml = xml.replace(/I”m/g, "I’m"); xml = xml.replace(/([a-z]+)!<\/em>/g, "$1!"); + xml = xml.replace(/(?([\w ’]+)([!.?])”<\/em>/g, "$1$2”"); + xml = xml.replace(/([\w ’]+[!.?])”<\/em>/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 5485182..8cdf8c4 100644 --- a/lib/substitutions.json +++ b/lib/substitutions.json @@ -2544,6 +2544,10 @@ { "before": "city,” Jess said. “And", "after": "city,” Jess said, “and" + }, + { + "before": "“No!”", + "after": "“No!”" } ], "https://parahumans.wordpress.com/2013/01/10/migration-17-3/": [ @@ -3438,6 +3442,10 @@ { "before": "White capped", "after": "White-capped" + }, + { + "before": ". “Bosses are worried.”", + "after": ". “Bosses are worried.”" } ], "https://parahumans.wordpress.com/2013/07/09/scarab-25-4/": [ @@ -3486,12 +3494,6 @@ "after": "avoided" } ], - "https://parahumans.wordpress.com/2013/07/16/interlude-25/": [ - { - "before": "your manners?”", - "after": "your manners?”" - } - ], "https://parahumans.wordpress.com/2013/07/18/sting-26-1/": [ { "before": "up,” I said. “The", @@ -5798,10 +5800,6 @@ { "before": "Be safe—Nat.", "after": "Be safe —Nat." - }, - { - "before": "kill each other.”", - "after": "kill each other.”" } ], "https://www.parahumans.net/2018/11/17/polarize-10-8/": [ @@ -5904,10 +5902,6 @@ { "before": "how it were more active", "after": "how it was more active" - }, - { - "before": "running to the same places.”", - "after": "running to the same places.”" } ], "https://www.parahumans.net/2018/12/04/polarize-10-12/": [ @@ -6287,6 +6281,10 @@ { "before": "you have have surmised", "after": "you have surmised" + }, + { + "before": "pound of flesh, at least—!”", + "after": "pound of flesh, at least—!”" } ], "https://www.parahumans.net/2019/04/02/black-13-1/": [ @@ -6649,6 +6647,10 @@ { "before": "looking for mom in the crowd", "after": "looking for Mom in the crowd" + }, + { + "before": "“Entrapment.”", + "after": "“Entrapment.”" } ], "https://www.parahumans.net/2019/11/23/radiation-18-3/": [ @@ -6803,6 +6805,10 @@ { "before": "you know about” my Aunt Sarah said", "after": "you know about,” my Aunt Sarah said" + }, + { + "before": "so they grow in…”", + "after": "so they grow in…”" } ], "https://www.parahumans.net/2020/02/11/infrared-19-f/": [ @@ -6841,6 +6847,12 @@ "after": "across this clearing. Eyes, cameras" } ], + "https://www.parahumans.net/2020/03/07/last-20-4/": [ + { + "before": "peace!” Cryptid growled", + "after": "peace!” Cryptid growled" + } + ], "https://www.parahumans.net/2020/03/31/last-20-10/": [ { "before": "shaping it as it rolled out. it became a circular",