:last css selector not working in DocumentFragment #454

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

Projects

None yet

2 participants

@brain-geek

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.

Owner

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

@flavorjones flavorjones self-assigned this Dec 31, 2014
@flavorjones flavorjones added a commit that referenced this issue Jan 2, 2015
@flavorjones flavorjones Tests demonstrating the issue from #572
and #454 and #370 and #213.
ab26d27
Owner

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

@flavorjones flavorjones closed this Jan 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment