From d69484af8e8481c64a1fd38a266ec09dabadfca8 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Tue, 17 Nov 2020 10:39:03 -0500 Subject: [PATCH] Fix messed up chapters with text conversations aea63ba05564b97580042213b8875e71bb6080bb introduced a bug where these chapters would contain ill-formed XML, and so at least some eBook readers would refuse to display them. --- lib/convert-worker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/convert-worker.js b/lib/convert-worker.js index 531347b..7bb84db 100644 --- a/lib/convert-worker.js +++ b/lib/convert-worker.js @@ -207,7 +207,7 @@ function getBodyXML(chapter, book, contentEl) { xml = xml.replace(/@<\/strong>/g, "@"); xml = xml.replace(/
(\s*)<\/strong>/g, "

$1"); xml = xml.replace(/(\s*)<\/strong>/g, "$1"); - xml = xml.replace(/>(.*)<\/strong>:$1:(.*)<\/strong>:$1:<"); // No need for line breaks before paragraph ends // These often occur with the
s inside /// fixed above.