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

Support direct combinators in CSS :has() #1895

Merged
merged 5 commits into from
Apr 23, 2019

Conversation

jonathanhefner
Copy link
Contributor

What problem is this PR intended to solve?

Adds support for CSS queries like "a:has(> b)", "a:has(~ b)", and "a:has(+ b)".

Closes #688.

Have you included adequate test coverage?

Yes, I think so.

Does this change affect the C or the Java implementations?

No.

@codeclimate
Copy link

codeclimate bot commented Apr 18, 2019

Code Climate has analyzed commit 593fae6 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (80% is the threshold).

This pull request will bring the total coverage in the repository to 93.5%.

View more on Code Climate.

@flavorjones
Copy link
Member

@jonathanhefner Thanks for submitting this PR! I've added some tests that run CSS queries on a real document to make sure I understand how these pseudoselector queries work. Should be through CI shortly!

@flavorjones flavorjones added this to the v1.11.0 milestone Apr 22, 2019
flavorjones added a commit to jonathanhefner/nokogiri that referenced this pull request Apr 22, 2019
@flavorjones
Copy link
Member

Sorry for the force-push, rebased onto current master.

@flavorjones flavorjones merged commit d1a51d1 into sparklemotion:master Apr 23, 2019
@flavorjones
Copy link
Member

Thank you! This will be in v1.11.0 when it ships. Watch the milestone for details.

@jonathanhefner
Copy link
Contributor Author

@flavorjones Thank you for adding those tests and merging this in! 😃

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

Successfully merging this pull request may close these issues.

Should support CSS selector: parent:has(>child)
2 participants