-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
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
nested :has() selector not working [v1.17.2] #2131
Comments
General nested jsoup/src/test/java/org/jsoup/select/SelectorTest.java Lines 577 to 594 in c3963d4
I thought this might be related to #2137, but it doesn't seem to be. But, your selector doesn't work in Chrome either. So I'm not 100% sure here... |
Yes, on one hand - nested :has() is not supported by browsers
On the other hand - "pseudo-elements problem" is a problem for browsers, but not for jsoup Anyway, it would be nice if you could fix it. |
Looking at it some more. I don't think it's specifically the nested has. The query can be simplified to: which fails (yet works in browsers). Both https://try.jsoup.org/~0Imle8wRufxJsGLk0Lt2ReHywC8 So there is an incorrect interaction between the ImmediateParentRun and the ImmediatePreviousSibling, somehow. |
This is an effective dupe of #2187 |
Actually, my reduction of the issue found the same as #2187, but the initial report is something different. |
|
OK, fixed! Thanks for the report. It wasn't the root being incorrect, it was re-use of the inflight Element Iterator that was trashing the match. |
Hi.
It seems nested :has() selectors not working.
Result:
The text was updated successfully, but these errors were encountered: