Restore original scene breaks, instead of using <hr>
This commit is contained in:
parent
b4454f8432
commit
547b7e9518
2 changed files with 16 additions and 12 deletions
|
|
@ -288,15 +288,19 @@ function getBodyXML(chapter, book, contentEl) {
|
|||
xml = xml.replace(/Simurgh-Myrddin-plant/g, "Simurgh–Myrddin–plant");
|
||||
xml = xml.replace(/Armsmaster-Defiant/g, "Armsmaster–Defiant");
|
||||
|
||||
// Use <hr> for separators
|
||||
// https://www.parahumans.net/2019/12/21/interlude-18-z-radiation/ has "super-separators" ("⊙ ⊙ ⊙ ⊙ ⊙") which we
|
||||
// leave untouched for now.
|
||||
xml = xml.replace(/<p>■<\/p>/g, "<hr />");
|
||||
xml = xml.replace(/<p style="text-align:center;">■<\/p>/g, "<hr />");
|
||||
xml = xml.replace(/<p style="text-align: center;">⊙<\/p>/g, "<hr />");
|
||||
xml = xml.replace(/<p style="text-align: center;"><strong>⊙<\/strong><\/p>/g, "<hr />");
|
||||
xml = xml.replace(/<p style="text-align: center;"><em><strong>⊙<\/strong><\/em><\/p>/g, "<hr />");
|
||||
xml = xml.replace(/<p style="text-align: center;"><strong>⊙⊙<\/strong><\/p>/g, "<hr />");
|
||||
// Normalize scene breaks. <hr> would be more semantically appropriate, but loses the author's intent. This is
|
||||
// especially the case in Ward, which uses a variety of different scene breaks.
|
||||
xml = xml.replace(/<p(?:[^>]*)>■<\/p>/g, `<p style="text-align: center;">■</p>`);
|
||||
|
||||
xml = xml.replace(/<p style="text-align: center;">⊙<\/p>/g, `<p style="text-align: center;">⊙</p>`);
|
||||
xml = xml.replace(/<p style="text-align: center;"><strong>⊙<\/strong><\/p>/g, `<p style="text-align: center;">⊙</p>`);
|
||||
xml = xml.replace(/<p style="text-align: center;"><em><strong>⊙<\/strong><\/em><\/p>/g,
|
||||
`<p style="text-align: center;">⊙</p>`);
|
||||
xml = xml.replace(/<p style="text-align: center;"><strong>⊙⊙<\/strong><\/p>/g,
|
||||
`<p style="text-align: center;">⊙</p>`);
|
||||
|
||||
xml = xml.replace(/<p style="text-align: center;"><strong>⊙ *⊙ *⊙ *⊙ *⊙<\/strong><\/p>/g,
|
||||
`<p style="text-align: center;">⊙ ⊙ ⊙ ⊙ ⊙</p>`);
|
||||
|
||||
// Fix recurring miscapitalization with questions
|
||||
xml = xml.replace(/\?”\s\s?She asked/g, "?” she asked");
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"after": "bugs: flies, ants"
|
||||
},
|
||||
{
|
||||
"before": "<p><em>Brief note from the author: This story isn’t intended for young or sensitive readers. Readers who are on the lookout for <a href=\"http://www.urbandictionary.com/define.php?term=Trigger%20warning&defid=6195009\">trigger warnings</a> are advised to give Worm a pass.</em></p>\n<hr />\n",
|
||||
"before": "<p><em>Brief note from the author: This story isn’t intended for young or sensitive readers. Readers who are on the lookout for <a href=\"http://www.urbandictionary.com/define.php?term=Trigger%20warning&defid=6195009\">trigger warnings</a> are advised to give Worm a pass.</em></p>\n<p style=\"text-align: center;\">■</p>\n",
|
||||
"after": "",
|
||||
"_comment": "The pseudo-trigger warning is out of place in an eBook."
|
||||
}
|
||||
|
|
@ -4334,7 +4334,7 @@
|
|||
],
|
||||
"https://www.parahumans.net/2017/09/11/daybreak-1-1/": [
|
||||
{
|
||||
"before": "<p>Ward is the second work in the Parahumans series, and reading <strong><a href=\"https://parahumans.wordpress.com/\">Worm</a></strong> first is strongly recommended. A lot of this won’t make sense otherwise and if you do find yourself a fan of the universe, the spoilers in Ward will affect the reading of the other work.</p>\n<p>Ward is not recommended for young or sensitive readers.</p>\n<hr />",
|
||||
"before": "<p>Ward is the second work in the Parahumans series, and reading <strong><a href=\"https://parahumans.wordpress.com/\">Worm</a></strong> first is strongly recommended. A lot of this won’t make sense otherwise and if you do find yourself a fan of the universe, the spoilers in Ward will affect the reading of the other work.</p>\n<p>Ward is not recommended for young or sensitive readers.</p>\n<p style=\"text-align: center;\">⊙</p>\n",
|
||||
"after": "",
|
||||
"_comment": "This is out of place in an eBook."
|
||||
}
|
||||
|
|
@ -5013,7 +5013,7 @@
|
|||
],
|
||||
"https://www.parahumans.net/2018/06/05/torch-7-5/": [
|
||||
{
|
||||
"before": "<hr />\n<p><em>I don’t",
|
||||
"before": "<p style=\"text-align: center;\">⊙</p>\n<p><em>I don’t",
|
||||
"after": "<p><em>I don’t"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue