-
Notifications
You must be signed in to change notification settings - Fork 4
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
$singleTextNode->is(':text')
throws
#49
Comments
Hi @rulatir, Thanks for taking the time to report this. We certainly will want to fix the PHP error that's occurring when passing this pseudo-class selector to You should be aware that even when we do, your test |
What is then the idiomatic way to determine whether the collection is holding a text node? Note to self: don't ask AI how to code things. |
@rulatir the QueryPath way would be But if you really need low-level access to the DOM classes in a collection, this can be done via I've incorporated your bug report into a draft pull request so the PHP error can be fixed in the future: #50. If you have further questions about using QueryPath please open a Discussion: https://github.com/GravityPDF/querypath/discussions |
Guidelines
Description of the bug
Invoking
->is(':text')
on aQueryPath
object that contains a single text node throws.This is the sixth PHP DOM library I'm trying this week, so with each new one I start by writing a couple of suitability tests. This is the first suitability test I wrote for querypath, and should serve as repro.
Expected: passing test
Actual:
QueryPath version
3.2.3
PHP Version and environment (server type, cli provider etc., enclosing libraries and their respective versions)
8.3.4 (cli) on up-to-date Arch Linux
Minimal reproducible PHP+HTML snippet to replicate bug
The text was updated successfully, but these errors were encountered: