-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
.children() gets applied to all descendants not just immediate descendants #17
Comments
Do you plan to implement this? What about selectors like 'ul > li' to grab immediate children? |
I took a look at this earlier - this should be addressed in cheerio-soupselect. I'm hoping to close this bug this weekend. Here's where the discussion will be: matthewmueller/cheerio-soupselect#7 |
I'm not understanding the feature/bug here. I thought that Currently it seems as thought: var cheerio = require("cheerio"),
$ = cheerio.load('<p><h1></h1><div><anotherd></anotherd></div></p>');
console.log($("p").children()); Returns the appropriate result:
|
It's the selector that looks through the children when it shouldn't. Try:
I think this is best managed by adding a |
Ahhh, I see the problem. |
high fives for whoever implements depth + more css3-style selectors ("ul > li") |
:-) it's on my todo list but unfortunately my todo list is very long :-/ |
You should be able to use |
See #6 for more information
The text was updated successfully, but these errors were encountered: