Fix trailing spaces before </em>

Closes #2.
This commit is contained in:
Domenic Denicola 2017-08-13 16:07:26 -04:00
commit a27b8a6e2f
2 changed files with 6 additions and 5 deletions

View file

@ -151,6 +151,7 @@ function getBodyXML(chapter, contentEl) {
xml = xml.replace(/<p><em>([^>]+)<\/em>(!|\?|\.)<\/p>/g, "<p><em>$1$2</em></p>");
xml = xml.replace(/(!|\?|\.)\s{2}<\/em><\/p>/g, "$1</em></p>");
xml = xml.replace(/<em>([a-z]+)\?<\/em>/g, "<em>$1</em>?");
xml = xml.replace(/<em>([^>]+?)( +)<\/em>/g, "<em>$1</em>$2");
// Fix recurring poor quotes and apostrophes
xml = xml.replace(/<p>”/g, "<p>“");

View file

@ -21,7 +21,7 @@
"after": "sue you,” he gasped"
},
{
"before": "<em>principles, </em>Glory",
"before": "<em>principles,</em> Glory",
"after": "<em>principles</em>, Glory"
}
],
@ -93,8 +93,8 @@
],
"https://parahumans.wordpress.com/2012/08/11/snare-13-5/": [
{
"before": "<em>similar. </em>",
"after": "<em>similar</em>. "
"before": "<em>similar.</em>",
"after": "<em>similar</em>."
}
],
"https://parahumans.wordpress.com/2012/08/18/snare-13-7/": [
@ -1020,8 +1020,8 @@
"after": "Tattletale: waiting?"
},
{
"before": "<em>yes! </em>",
"after": "<em>yes</em>! "
"before": "<em>yes!</em>",
"after": "<em>yes</em>!"
},
{
"before": "Please, If you",