Remove redundant text-align: left
This commit is contained in:
parent
f1d9276b67
commit
3d4b49fbba
1 changed files with 4 additions and 1 deletions
|
|
@ -65,7 +65,7 @@ function getBodyXML(chapter, contentEl) {
|
||||||
contentEl.removeChild(contentEl.lastElementChild);
|
contentEl.removeChild(contentEl.lastElementChild);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove redundant attributes
|
// Remove redundant attributes and style
|
||||||
Array.prototype.forEach.call(contentEl.children, child => {
|
Array.prototype.forEach.call(contentEl.children, child => {
|
||||||
if (child.getAttribute("dir") === "ltr") {
|
if (child.getAttribute("dir") === "ltr") {
|
||||||
child.removeAttribute("dir");
|
child.removeAttribute("dir");
|
||||||
|
|
@ -78,6 +78,9 @@ function getBodyXML(chapter, contentEl) {
|
||||||
if (child.getAttribute("style") === "text-align:left;") {
|
if (child.getAttribute("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;");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Remove empty <em>s and <i>s
|
// Remove empty <em>s and <i>s
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue