You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand that headers shouldn't be a part of paragraph, but still it should be more explicit in context of code bellow.
If Element is replaced with div or null everything is perfect
Sorry for Kotlin, hope it still readable.
val bareFragment ="<h2> text </h2>"Document("").parser().parseFragmentInput(bareFragment, Element("p"), "")
output:
java.lang.NullPointerException
at org.jsoup.parser.HtmlTreeBuilderState$7.inBodyStartTag(HtmlTreeBuilderState.java:545)
at org.jsoup.parser.HtmlTreeBuilderState$7.process(HtmlTreeBuilderState.java:286)
at org.jsoup.parser.HtmlTreeBuilder.process(HtmlTreeBuilder.java:149)
at org.jsoup.parser.TreeBuilder.runParser(TreeBuilder.java:76)
at org.jsoup.parser.HtmlTreeBuilder.parseFragment(HtmlTreeBuilder.java:133)
at org.jsoup.parser.Parser.parseFragmentInput(Parser.java:53)
The text was updated successfully, but these errors were encountered:
I understand that headers shouldn't be a part of paragraph, but still it should be more explicit in context of code bellow.
If Element is replaced with
div
ornull
everything is perfectSorry for Kotlin, hope it still readable.
output:
The text was updated successfully, but these errors were encountered: