Skip to content
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

DocumentFragment lacks detailed search #123

Closed
samsm opened this issue Aug 26, 2009 · 1 comment
Closed

DocumentFragment lacks detailed search #123

samsm opened this issue Aug 26, 2009 · 1 comment

Comments

@samsm
Copy link

samsm commented Aug 26, 2009

fragment = '<p id="content">hi</p>'
Nokogiri::HTML.fragment(fragment).search('#content').length # this returns zero
Nokogiri::HTML(fragment).search('#content').length # this returns 1

Searching for an element ('p') does work, but using any CSS selector or XPath seems to always produce zero results. Non-fragment search works as I'd expect.

@tenderlove
Copy link
Member

delegating DocumentFragment#css to the fragment children. closed by ed10f01

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants