Normalize italics and single quotes together
This commit is contained in:
parent
4559265286
commit
520962e633
1 changed files with 3 additions and 0 deletions
|
|
@ -151,6 +151,9 @@ function getBodyXML(chapter, contentEl) {
|
|||
xml = xml.replace(/<em>([^>]+?)( +)<\/em>/g, "<em>$1</em>$2");
|
||||
xml = xml.replace(/<p>“<em>([^>]+)”<\/em><\/p>/g, "<p>“<em>$1</em>”</p>");
|
||||
xml = xml.replace(/<em> ([a-zA-Z]+)<\/em>/g, " <em>$1</em>");
|
||||
xml = xml.replace(/<em>‘([^<]+)’<\/em>/g, "‘<em>$1</em>’");
|
||||
xml = xml.replace(/<em>‘([^<]+)<\/em>’/g, "‘<em>$1</em>’");
|
||||
xml = xml.replace(/‘<em>([^<]+)’<\/em>/g, "‘<em>$1</em>’");
|
||||
|
||||
// Fix recurring poor quotes and apostrophes
|
||||
xml = xml.replace(/<p>”/g, "<p>“");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue