From aeb80253fce103101d78c5afaf88e74fe86b944b Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 6 Nov 2020 20:54:49 +0100 Subject: [PATCH] Transfer col padding to row --- .../main/java/eu/faircode/email/HtmlHelper.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index cca713bf77..a35147e73a 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -821,6 +821,20 @@ public class HtmlHelper { for (Element col : document.select("th,td")) { col.attr("x-col", "true"); + String before = col.attr("x-line-before"); + if (!TextUtils.isEmpty(before)) { + if ("true".equals(before) && col.parent() != null) + col.parent().attr("x-line-before", "true"); + col.removeAttr("x-line-before"); + } + + String after = col.attr("x-line-after"); + if (!TextUtils.isEmpty(after)) { + if ("true".equals(after) && col.parent() != null) + col.parent().attr("x-line-after", "true"); + col.removeAttr("x-line-after"); + } + if ("th".equals(col.tagName())) col.tagName("strong"); else