Fixed formatting of text only columns

This commit is contained in:
M66B 2019-09-09 08:43:59 +02:00
parent cbdb089477
commit 648bb0b509
1 changed files with 8 additions and 2 deletions

View File

@ -209,10 +209,16 @@ public class HtmlHelper {
// Tables
for (Element col : document.select("th,td")) {
boolean content = false;
for (Element e : col.children())
if (!e.isBlock() && hasContent(e)) {
for (Node node : col.childNodes())
if (node instanceof TextNode) {
content = true;
break;
} else if (node instanceof Element) {
Element element = (Element) node;
if (!element.isBlock() && hasContent(element)) {
content = true;
break;
}
}
// separate columns