We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String s = Jsoup.parse("Hello<br>World").wholeText(); System.out.println(s);
String s = Jsoup.parse("Hello<br>World").wholeText();
System.out.println(s);
prints HelloWorld.
HelloWorld
But shouldn't it be Hello World ?
Hello
World
There is no line separator.
The text was updated successfully, but these errors were encountered:
Maybe it can be solved by adding detection of special tags like <br> and convert them manually in wholeText().
<br>
wholeText()
public void head(Node node, int depth) { if (node instanceof TextNode) { TextNode textNode = (TextNode) node; accum.append(textNode.getWholeText()); }else if (node.nodeName().equals("br")){ accum.append("\n"); } }
But whether there is a need to do it? And deal with more special tags like <hr> or just <br> ?
<hr>
Sorry, something went wrong.
Fix issue jhy#1437
2d53cb8
Test BRs are treated as newlines in wholeText
22f05e8
For #1437 Was fixed by #1636
Thanks this was fixed in #1636
No branches or pull requests
String s = Jsoup.parse("Hello<br>World").wholeText();
System.out.println(s);
prints
HelloWorld
.But shouldn't it be
Hello
World
?There is no line separator.
The text was updated successfully, but these errors were encountered: