Uniformize indentation between Ward and Worm
This commit is contained in:
parent
fb93322823
commit
699c9be71f
1 changed files with 8 additions and 3 deletions
|
|
@ -57,11 +57,16 @@ 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;") {
|
|
||||||
child.setAttribute("style", "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;");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue