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

:last css selector not working in DocumentFragment #454

Closed
brain-geek opened this issue May 5, 2011 · 2 comments
Closed

:last css selector not working in DocumentFragment #454

brain-geek opened this issue May 5, 2011 · 2 comments
Assignees

Comments

@brain-geek
Copy link

Test to reproduce bug:

  def test_last_fragment
    text = '<p>Lorem ipsum</p><p>Second paragraph</p><div>Not paragraph</div>'
    fragment = Nokogiri::HTML.fragment text

    assert_equal(1, fragment.search('p:last').size)
    assert_equal(1, fragment.css('p:last').size)
  end

Looks like this works with document, but fails in fragment.

@flavorjones
Copy link
Member

This is a dup of either #213 or #370.

@flavorjones flavorjones self-assigned this Dec 31, 2014
flavorjones added a commit that referenced this issue Jan 2, 2015
@flavorjones
Copy link
Member

Folding this into #572, the underlying issue is the same.

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

3 participants
@flavorjones @brain-geek and others