mirror of https://github.com/M66B/FairEmail.git
Small improvement
This commit is contained in:
parent
53373b1af1
commit
b2d79f2be7
|
@ -115,19 +115,24 @@ public class HtmlHelper {
|
||||||
// Tables
|
// Tables
|
||||||
for (Element col : document.select("th,td")) {
|
for (Element col : document.select("th,td")) {
|
||||||
// prevent line breaks
|
// prevent line breaks
|
||||||
col.select("br").tagName("span").html(" ");
|
col.select("br").tagName("span").html(" ");
|
||||||
col.select("div").tagName("span");
|
col.select("div").tagName("span");
|
||||||
|
|
||||||
Element next = col.nextElementSibling();
|
// separate columns by a space
|
||||||
if (next != null && ("th".equals(next.tagName()) || "td".equals(next.tagName())))
|
if (col.nextElementSibling() != null)
|
||||||
col.append(" "); // separate columns by a space
|
col.append(" ");
|
||||||
|
|
||||||
|
if ("th".equals(col.tagName()))
|
||||||
|
col.tagName("strong");
|
||||||
else
|
else
|
||||||
col.appendElement("br"); // line break after last column
|
col.tagName("span");
|
||||||
}
|
}
|
||||||
document.select("table").tagName("div");
|
|
||||||
|
for (Element row : document.select("tr"))
|
||||||
|
row.tagName("span").appendElement("br");
|
||||||
|
|
||||||
document.select("caption").tagName("p");
|
document.select("caption").tagName("p");
|
||||||
document.select("td").tagName("span");
|
document.select("table").tagName("div");
|
||||||
document.select("th").tagName("strong");
|
|
||||||
|
|
||||||
// Lists
|
// Lists
|
||||||
for (Element li : document.select("li")) {
|
for (Element li : document.select("li")) {
|
||||||
|
|
Loading…
Reference in New Issue