Normalize Ward chapter titles
This commit is contained in:
parent
2593540551
commit
559681e4ec
1 changed files with 5 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue