Uniformize indentation between Ward and Worm

This commit is contained in:
Domenic Denicola 2020-10-26 21:20:30 -04:00
commit 699c9be71f

View file

@ -57,10 +57,15 @@ function getBodyXML(chapter, book, contentEl) {
// useless) // useless)
child.removeAttribute("align"); child.removeAttribute("align");
if (child.getAttribute("style") === "text-align:left;") { const style = child.getAttribute("style");
if (style === "text-align:left;" || style === "text-align: left;") {
child.removeAttribute("style"); child.removeAttribute("style");
} }
if (child.getAttribute("style") === "text-align:left;padding-left:30px;") {
// Worm uses 30px; Ward mostly uses 40px but sometimes uses 30px/60px. Let's standardize on 30px.
if (style === "text-align:left;padding-left:30px;" ||
style === "text-align: left;padding-left: 40px;" ||
style === "padding-left: 40px;") {
child.setAttribute("style", "padding-left: 30px;"); child.setAttribute("style", "padding-left: 30px;");
} }
} }