diff --git a/lib/download.js b/lib/download.js index 0e5b40e..b7541ab 100644 --- a/lib/download.js +++ b/lib/download.js @@ -89,7 +89,11 @@ function getNextChapterURL(rawChapterDoc) { } function getChapterTitle(rawChapterDoc) { - return rawChapterDoc.querySelector("h1.entry-title").textContent; + // Remove " – " because it's present in Ward but not in Worm, which is inconsistent. (And leaving it in causes slight + // issues down the line where we remove spaces around em dashes during conversion.) In the future it might be nice to + // have proper chapter titles, e.g. sections per arc with title pages and then just "1" or similar for the chapter. + // Until then this is reasonable and uniform. + return rawChapterDoc.querySelector("h1.entry-title").textContent.replace(/ – /, " "); } function retry(times, fn) {