From 6cdf486858666ea9e60d1480b7226aa447a71fd6 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Sat, 7 Nov 2020 17:39:13 -0500 Subject: [PATCH] Fix missing spaces after commas --- lib/convert-worker.js | 3 +++ lib/substitutions.json | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/convert-worker.js b/lib/convert-worker.js index 05292c8..ec909a8 100644 --- a/lib/convert-worker.js +++ b/lib/convert-worker.js @@ -262,6 +262,9 @@ function getBodyXML(chapter, book, contentEl) { xml = xml.replace(/I-I/g, "I—I"); xml = xml.replace(/I-uh/g, "I—uh"); + // Fix missing spaces after commas + xml = xml.replace(/([a-zA-Z]+),([a-zA-Z]+)/g, "$1, $2"); + // Joint names should use em dashes xml = xml.replace(/Dallon-Pelham/g, "Dallon–Pelham"); xml = xml.replace(/Bet-Gimel/g, "Bet–Gimel"); diff --git a/lib/substitutions.json b/lib/substitutions.json index 412659d..9d1d362 100644 --- a/lib/substitutions.json +++ b/lib/substitutions.json @@ -2754,10 +2754,6 @@ "before": "fighting. But.", "after": "fighting. But…" }, - { - "before": "r,s", - "after": "r, s" - }, { "before": "—But I have", "after": "—but I have"