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

nth-of-type should work with no parent #22

Open
thorwil opened this issue May 1, 2011 · 2 comments
Open

nth-of-type should work with no parent #22

thorwil opened this issue May 1, 2011 · 2 comments
Assignees

Comments

@thorwil
Copy link

thorwil commented May 1, 2011

With defsnippet and a selector like [:div#content :> :*], nth-of-type should still work for elements that are now without parent.

@bendlas
Copy link

bendlas commented Aug 23, 2011

Test case for this bug:

(html/sniptest "<h1></h1><h1></h1>"
               [[:h1 (html/nth-of-type 1)]] (html/content "foo"))

Expected: "<h1>foo</h1><h1></h1>"
Actual: "<h1>foo</h1><h1>foo</h1>"

With parent, it works:

> (html/sniptest "<body><h1></h1><h1></h1></body>"
                 [[:h1 (html/nth-of-type 1)]] (html/content "foo"))
"<body><h1>foo</h1><h1></h1></body>"

@cgrand
Copy link
Owner

cgrand commented Sep 2, 2015

@JustinIAC this could be fixed by making xml-zip to consider (and update) collections of nodes as document fragments (to speak in DOM parlance).

@fdserr fdserr self-assigned this Sep 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants