Check for empty rows

This commit is contained in:
M66B
2019-09-12 15:28:21 +02:00
parent 4a81f17a1f
commit ae7878b4af

View File

@@ -230,9 +230,11 @@ public class HtmlHelper {
for (Element row : document.select("tr")) {
row.tagName("span");
Element next = row.nextElementSibling();
if (next != null && "tr".equals(next.tagName()))
row.appendElement("br");
if (hasContent(row.childNodes())) {
Element next = row.nextElementSibling();
if (next != null && "tr".equals(next.tagName()))
row.appendElement("br");
}
}
document.select("caption").tagName("div");