Remove extra spaces before closing quote marks

This commit is contained in:
Domenic Denicola 2020-11-29 15:29:00 -05:00
commit 4c1c7cd03d
2 changed files with 22 additions and 9 deletions

View file

@ -187,6 +187,7 @@ function getBodyXML(chapter, book, contentEl) {
xml = xml.replace(/([A-Za-z])s(\s?)/g, "$1s$2");
xml = xml.replace(/Im/g, "Im");
xml = xml.replace(/<p>“\s+/g, "<p>“");
xml = xml.replace(/\s+”/g, "”");
xml = xml.replace(/'/g, "");
xml = xml.replace(/([A-Za-z]+)/g, "$1");
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(/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");

View file

@ -372,6 +372,10 @@
{
"before": "so to speak, they",
"after": "so to speak; they"
},
{
"before": "Brian looked across the room,” Weve",
"after": "Brian looked across the room. “Weve"
}
],
"https://parahumans.wordpress.com/2011/11/12/hive-5-3/": [
@ -464,6 +468,10 @@
{
"before": "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/": [
@ -2354,15 +2362,15 @@
"after": "to,” Alexandria spoke, “is"
},
{
"before": "leave?” Hero asked. ”Why",
"before": "leave?” Hero asked.”Why",
"after": "leave?” Hero asked. “Why"
},
{
"before": "Alexandria said. ”Why",
"before": "Alexandria said.”Why",
"after": "Alexandria said. “Why"
},
{
"before": "voice as quiet. ”Weve got teams",
"before": "voice as quiet.”Weve got teams",
"after": "voice as quiet. “Weve got teams"
}
],
@ -2883,7 +2891,7 @@
],
"https://parahumans.wordpress.com/2013/02/16/interlude-18/": [
{
"before": "her feet. ”Were",
"before": "her feet.”Were",
"after": "her feet. “Were"
}
],
@ -3546,6 +3554,10 @@
{
"before": "me,” I said. “Is",
"after": "me,” I said, “is"
},
{
"before": "<p><em>“Helps on the way</em>.”</p>",
"after": "<p>“<em>Helps on the way.</em>”</p>"
}
],
"https://parahumans.wordpress.com/2013/07/25/interlude-26-donation-bonus-1/": [
@ -5755,10 +5767,6 @@
"before": "post-Prison",
"after": "post-prison"
},
{
"before": "to take power! ”",
"after": "to take power!’”"
},
{
"before": "Im sorry, <em>what? What?</em>",
"after": "Im sorry, <em>what</em>? <em>What?</em>"
@ -7626,6 +7634,10 @@
{
"before": "had harangued the P.R.T., even",
"after": "had harangued the PRT, even"
},
{
"before": "“Actually,” Tattletale said. “Ive been going",
"after": "“Actually,” Tattletale said, “Ive been going"
}
],
"https://www.parahumans.net/2020/04/21/last-20-e4/": [