-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
bugA confirmed bug, that we should fixA confirmed bug, that we should fixfixedAn {bug|improvement} that has been {fixed|implemented}An {bug|improvement} that has been {fixed|implemented}
Milestone
Description
Given this HTML fragment:
<span>in span</span>
Text after span
parsing in 1.20.1 removes all of the whitespace between the end of the span
tag and Text after span
, leaving this:
<span>in span</span>Text after span
It should leave in at least one white space to be the same HTML:
<span>in span</span> Text after span
Failing test:
package foo;
import static org.jsoup.Jsoup.parse;
public class Jsoup {
public static void main(String[] args) {
var parsed = parse(
"""
<html>
<head></head>
<body>
<span>in span</span>
Text after span
</body>
</html>
""", "");
var expected =
"""
<html>
<head></head>
<body>
<span>in span</span> Text after span
</body>
</html>
""";
if (!parsed.toString().equals(expected)) {
throw new AssertionError("["+parsed+"] should be ["+expected+"]");
}
}
}
Metadata
Metadata
Assignees
Labels
bugA confirmed bug, that we should fixA confirmed bug, that we should fixfixedAn {bug|improvement} that has been {fixed|implemented}An {bug|improvement} that has been {fixed|implemented}