Italicize question marks in single-question-word sentences

This commit is contained in:
Domenic Denicola 2020-11-29 15:34:23 -05:00
commit 2a09195471
2 changed files with 2 additions and 13 deletions

View file

@ -198,9 +198,10 @@ function getBodyXML(chapter, book, contentEl) {
xml = xml.replace(/<em>([\w ’]+[!.?])”<\/em>/g, "<em>$1</em>”");
xml = xml.replace(/I”(m|ll)/g, "I’$1");
xml = xml.replace(/””<\/p>/g, "”</p>");
xml = xml.replace(/^([^“]+? ?)”(?![ —<])/gm, "$1 “");
xml = xml.replace(/^([^“]+?) ?”(?![ —<])/gm, "$1 “");
xml = xml.replace(/(?<!“)<em>([A-Za-z]+),<\/em>(?!”| +[A-Za-z]+ thought)/, "<em>$1</em>,");
xml = xml.replace(/‘([Kk])ay(?!’)/g, "’$1ay");
xml = xml.replace(/<em>(Why|What|Who|How|Where|When)<\/em>\?/g, "<em>$1?</em>");
// Similar problems occur in Ward with <b> and <strong> as do in Worm with <em>s
xml = xml.replace(/<b \/>/g, "");

View file

@ -1539,10 +1539,6 @@
"before": "Brian, “You’re",
"after": "Brian. “You’re"
},
{
"before": "<em>Why</em>? Why come",
"after": "<em>Why?</em> Why come"
},
{
"before": "‘Sides",
"after": "’Sides"
@ -7166,10 +7162,6 @@
"before": "I got a glimpse. it’s fucking with me",
"after": "I got a glimpse. It’s fucking with me"
},
{
"before": "<em>What</em>? But Cassie.",
"after": "<em>What?</em> But Cassie."
},
{
"before": "‘aunt Rachel‘s’",
"after": "‘Aunt Rachel’s’"
@ -7200,10 +7192,6 @@
"before": "got the Thrall Commander, right",
"after": "got the thrall commander, right"
},
{
"before": "I could ask these questions. <em>Why</em>?",
"after": "I could ask these questions. <em>Why?</em>"
},
{
"before": "the Yàngbǎn supported squad",
"after": "the Yàngbǎn-supported squad"