Remove extra spaces before closing quote marks
This commit is contained in:
parent
de83a47bfa
commit
4c1c7cd03d
2 changed files with 22 additions and 9 deletions
|
|
@ -187,6 +187,7 @@ function getBodyXML(chapter, book, contentEl) {
|
||||||
xml = xml.replace(/([A-Za-z])‘s(\s?)/g, "$1’s$2");
|
xml = xml.replace(/([A-Za-z])‘s(\s?)/g, "$1’s$2");
|
||||||
xml = xml.replace(/I‘m/g, "I’m");
|
xml = xml.replace(/I‘m/g, "I’m");
|
||||||
xml = xml.replace(/<p>“\s+/g, "<p>“");
|
xml = xml.replace(/<p>“\s+/g, "<p>“");
|
||||||
|
xml = xml.replace(/\s+”/g, "”");
|
||||||
xml = xml.replace(/'/g, "’");
|
xml = xml.replace(/'/g, "’");
|
||||||
xml = xml.replace(/’([A-Za-z]+)’/g, "‘$1’");
|
xml = xml.replace(/’([A-Za-z]+)’/g, "‘$1’");
|
||||||
xml = xml.replace(/([a-z])”<\/p>/g, "$1.”</p>");
|
xml = xml.replace(/([a-z])”<\/p>/g, "$1.”</p>");
|
||||||
|
|
@ -197,7 +198,7 @@ function getBodyXML(chapter, book, contentEl) {
|
||||||
xml = xml.replace(/<em>([\w ’]+[!.?])”<\/em>/g, "<em>$1</em>”");
|
xml = xml.replace(/<em>([\w ’]+[!.?])”<\/em>/g, "<em>$1</em>”");
|
||||||
xml = xml.replace(/I”(m|ll)/g, "I’$1");
|
xml = xml.replace(/I”(m|ll)/g, "I’$1");
|
||||||
xml = xml.replace(/””<\/p>/g, "”</p>");
|
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(/(?<!“)<em>([A-Za-z]+),<\/em>(?!”| +[A-Za-z]+ thought)/, "<em>$1</em>,");
|
||||||
xml = xml.replace(/‘([Kk])ay(?!’)/g, "’$1ay");
|
xml = xml.replace(/‘([Kk])ay(?!’)/g, "’$1ay");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -372,6 +372,10 @@
|
||||||
{
|
{
|
||||||
"before": "so to speak, they",
|
"before": "so to speak, they",
|
||||||
"after": "so to speak; they"
|
"after": "so to speak; they"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"before": "Brian looked across the room,” We’ve",
|
||||||
|
"after": "Brian looked across the room. “We’ve"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"https://parahumans.wordpress.com/2011/11/12/hive-5-3/": [
|
"https://parahumans.wordpress.com/2011/11/12/hive-5-3/": [
|
||||||
|
|
@ -464,6 +468,10 @@
|
||||||
{
|
{
|
||||||
"before": "East",
|
"before": "East",
|
||||||
"after": "east"
|
"after": "east"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"before": "“Yeah,” Newter grinned,” You can tell",
|
||||||
|
"after": "“Yeah,” Newter grinned. “You can tell"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"https://parahumans.wordpress.com/2011/12/10/interlude-5/": [
|
"https://parahumans.wordpress.com/2011/12/10/interlude-5/": [
|
||||||
|
|
@ -3546,6 +3554,10 @@
|
||||||
{
|
{
|
||||||
"before": "me,” I said. “Is",
|
"before": "me,” I said. “Is",
|
||||||
"after": "me,” I said, “is"
|
"after": "me,” I said, “is"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"before": "<p><em>“Help’s on the way</em>.”</p>",
|
||||||
|
"after": "<p>“<em>Help’s on the way.</em>”</p>"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"https://parahumans.wordpress.com/2013/07/25/interlude-26-donation-bonus-1/": [
|
"https://parahumans.wordpress.com/2013/07/25/interlude-26-donation-bonus-1/": [
|
||||||
|
|
@ -5755,10 +5767,6 @@
|
||||||
"before": "post-Prison",
|
"before": "post-Prison",
|
||||||
"after": "post-prison"
|
"after": "post-prison"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"before": "to take power!’ ”",
|
|
||||||
"after": "to take power!’”"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"before": "I’m sorry, <em>what? What?</em>",
|
"before": "I’m sorry, <em>what? What?</em>",
|
||||||
"after": "I’m sorry, <em>what</em>? <em>What?</em>"
|
"after": "I’m sorry, <em>what</em>? <em>What?</em>"
|
||||||
|
|
@ -7626,6 +7634,10 @@
|
||||||
{
|
{
|
||||||
"before": "had harangued the P.R.T., even",
|
"before": "had harangued the P.R.T., even",
|
||||||
"after": "had harangued the PRT, even"
|
"after": "had harangued the PRT, even"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"before": "“Actually,” Tattletale said. “I’ve been going",
|
||||||
|
"after": "“Actually,” Tattletale said, “I’ve been going"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"https://www.parahumans.net/2020/04/21/last-20-e4/": [
|
"https://www.parahumans.net/2020/04/21/last-20-e4/": [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue