Conditional column separator

pull/199/head
M66B 4 years ago
parent 8f5f945bec
commit c90559f241

@ -880,6 +880,7 @@ public class HtmlHelper {
for (Element row : table.children()) { for (Element row : table.children()) {
row.tagName("div"); row.tagName("div");
Element separate = null;
List<Node> merge = new ArrayList<>(); List<Node> merge = new ArrayList<>();
for (Element col : row.children()) { for (Element col : row.children()) {
Element next = col.nextElementSibling(); Element next = col.nextElementSibling();
@ -952,15 +953,18 @@ public class HtmlHelper {
//} //}
if (TextUtils.isEmpty(align) || if (TextUtils.isEmpty(align) ||
"left".equals(align) || "left".equals(align) ||
"start".equals(align)) "start".equals(align)) {
col.removeAttr("x-block"); col.removeAttr("x-block");
else { if (separate != null)
separate.attr("x-column", "true");
separate = col;
} else {
separate = null;
if ("true".equals(col.attr("x-line-before"))) if ("true".equals(col.attr("x-line-before")))
col.removeAttr("x-line-before"); col.removeAttr("x-line-before");
} }
col.tagName("div") col.tagName("div");
.attr("x-column", "true");
} }
if (merge.size() != 0) if (merge.size() != 0)

Loading…
Cancel
Save