mirror of https://github.com/M66B/FairEmail.git
Suppress more white space
This commit is contained in:
parent
1072edaa78
commit
655f0e3d3b
|
@ -188,6 +188,17 @@ public class HtmlHelper {
|
||||||
document.select("ul").tagName("div");
|
document.select("ul").tagName("div");
|
||||||
|
|
||||||
// Tables
|
// Tables
|
||||||
|
for (Element div : document.select("div")) {
|
||||||
|
Element parent = div.parent();
|
||||||
|
while (parent != null) {
|
||||||
|
if ("td".equals(parent.tagName())) {
|
||||||
|
div.tagName("span"); // Prevent white space
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
parent = parent.parent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (Element col : document.select("th,td")) {
|
for (Element col : document.select("th,td")) {
|
||||||
// separate columns by a space
|
// separate columns by a space
|
||||||
if (col.nextElementSibling() == null) {
|
if (col.nextElementSibling() == null) {
|
||||||
|
@ -209,7 +220,7 @@ public class HtmlHelper {
|
||||||
|
|
||||||
for (Element table : document.select("table"))
|
for (Element table : document.select("table"))
|
||||||
if (table.parent() != null && "a".equals(table.parent().tagName()))
|
if (table.parent() != null && "a".equals(table.parent().tagName()))
|
||||||
table.tagName("span"); // // Links cannot contain tables
|
table.tagName("span"); // Links cannot contain tables
|
||||||
else
|
else
|
||||||
table.tagName("div");
|
table.tagName("div");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue