Lint
Surprised I got away with this few errors, after not running lint for so long.
This commit is contained in:
parent
7e3dee3ed0
commit
e68602df35
1 changed files with 2 additions and 2 deletions
|
|
@ -147,13 +147,13 @@ function getBodyXml(chapter, contentEl) {
|
|||
xml = xml.replace(/([^\xA0])\xA0\xA0?([^\xA0])/g, "$1 $2");
|
||||
|
||||
// Fix recurring broken-up or erroneous <em>s
|
||||
xml = xml.replace(/<\/em>‘s/g, "’s</em>")
|
||||
xml = xml.replace(/<\/em>‘s/g, "’s</em>");
|
||||
xml = xml.replace(/<\/em><em>/g, "");
|
||||
xml = xml.replace(/<em>(\s?\s?[^A-Za-z]\s?\s?)<\/em>/g, "$1");
|
||||
xml = xml.replace(/<\/em>(\s?\s?[^A-Za-z]\s?\s?)<em>/g, "$1");
|
||||
xml = xml.replace(/“<em>([^>]+)<\/em>(!|\?|\.)”/g, "“<em>$1$2<\/em>”");
|
||||
xml = xml.replace(/<p><em>([^>]+)<\/em>(!|\?|\.)<\/p>/g, "<p><em>$1$2<\/em></p>");
|
||||
xml = xml.replace(/(!|\?|\.) <\/em><\/p>/g, "$1</em></p>");
|
||||
xml = xml.replace(/(!|\?|\.)\s{2}<\/em><\/p>/g, "$1</em></p>");
|
||||
|
||||
// Fix recurring poor quotes and apostrophes
|
||||
xml = xml.replace(/<p>”/g, "<p>“");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue