Prevent alignment of table contents

pull/187/head
M66B 4 years ago
parent f3b2231180
commit 6eadf1e183

@ -811,11 +811,13 @@ public class HtmlHelper {
document.select("caption").tagName("div");
for (Element table : document.select("table"))
for (Element table : document.select("table")) {
table.attr("x-table", "true");
if (table.parent() != null && "a".equals(table.parent().tagName()))
table.tagName("span"); // Links cannot contain tables
else
table.tagName("div");
}
for (Element hf : document.select("thead,tfoot"))
hf.tagName("span");
@ -2032,7 +2034,8 @@ public class HtmlHelper {
boolean table = false;
Element e = element;
while (e != null) {
if ("table".equals(e.tagName())) {
if ("table".equals(e.tagName()) ||
"true".equals(e.attr("x-table"))) {
table = true;
break;
}

Loading…
Cancel
Save