handle nested or empty div elements
This commit is contained in:
parent
3d5acc9983
commit
045747fb6d
|
@ -278,6 +278,11 @@ public class HtmlToWorldBuilder implements NodeVisitor {
|
|||
|
||||
@Override
|
||||
public void tail(Node node, int i) {
|
||||
if (!node.outerHtml().contains("br")) {
|
||||
String htmlToPlainText = Jsoup.parse(node.outerHtml()).text();
|
||||
if (htmlToPlainText.trim().isEmpty()) return;
|
||||
}
|
||||
|
||||
String name = node.nodeName();
|
||||
properties.put(name, false);
|
||||
parseProperties(node);
|
||||
|
|
Loading…
Reference in New Issue