Fix some hyphens to become em dashes at the beginning of italicized quotes

This commit is contained in:
Domenic Denicola 2020-10-17 20:14:57 -04:00
commit 91f02bd029

View file

@ -236,7 +236,7 @@ function getBodyXML(chapter, contentEl) {
// Fixes dashes
xml = xml.replace(/ /g, "—");
xml = xml.replace(/“-/g, "“—");
xml = xml.replace(/“((?:<em>)?)-/g, "“$1—");
xml = xml.replace(/-[,.]?”/g, "—”");
xml = xml.replace(/-(!|\?)”/g, "—$1”");
xml = xml.replace(/-[,.]?<\/em>”/g, "—</em>”");