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
@KennyWongPFPT Is it possible that in Parser.java, the following might be causing the issue?
public static Document parseBodyFragment(String bodyHtml, String baseUri) {
Document doc = Document.createShell(baseUri);
Element body = doc.body();
List nodeList = parseFragment(bodyHtml, body, baseUri);
Node[] nodes = nodeList.toArray(new Node[0]); // the node list gets modified when re-parented
for (int i = nodes.length - 1; i > 0; i--) {
nodes[i].remove();
}
for (Node node : nodes) {
body.appendChild(node);
}
return doc;}
I'm not trying to take a wild stab in the dark, but the HTML string you're passing doesn't contain an initial tag, so potentially setting the start to -1. If there's a check in place, I'm wondering if this will rectify the issue.
Hello,
We seeing -ve start/end positions for the source range of the first text node
foo
, for example using release1.16.1
:Release
1.17.2
has the end position correct, but the start is still-1
The text was updated successfully, but these errors were encountered: