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

NthChild with formula does not work #46

Closed
mitja-p opened this issue Jan 30, 2015 · 7 comments
Closed

NthChild with formula does not work #46

mitja-p opened this issue Jan 30, 2015 · 7 comments
Assignees
Labels
Milestone

Comments

@mitja-p
Copy link

mitja-p commented Jan 30, 2015

Hi,

I found a bug. When using QuerySelectorAll and using nth-child with calculations, for example tr:nth-child(n+2) it does not work correctly. It returns all children instead of the ones from second node on.

@FlorianRappl
Copy link
Contributor

Which version of AngleSharp are you using? I've seen that the nth-child calculation had a bug and fixed one a couple of weeks ago, hence in the latest sources the bug could be gone.

Otherwise please provide a MWE such that I can create a unit test and fix the bug.
Thanks a lot for reporting this issue!

@FlorianRappl FlorianRappl self-assigned this Jan 30, 2015
@FlorianRappl FlorianRappl added this to the v0.8 milestone Jan 30, 2015
@mitja-p
Copy link
Author

mitja-p commented Jan 30, 2015

This was in version 0.7. I tried the current source code and it works. Sorry for not testing before reporting it.

Thanks for developing this library!

@FlorianRappl
Copy link
Contributor

No - thank you for trying it! I am sorry that v0.8 is not yet released, but that will definitely change quite soon. I also plan to do pre-released starting after v0.8 has been released. That just alleviate the problem.

Please feel free to report further problems. Such contribution means a lot to me.

@mitja-p
Copy link
Author

mitja-p commented Feb 10, 2015

I have another nth-child problem. :)
Try loading the html from this page:
http://www.htmlcodetutorial.com/tables/_TD_COLSPAN.html

And then do the following operation:
doc.DocumentElement.QuerySelectorAll("table:nth-child(21)")

Browser (firefox) has no problem with this selector, but AngleSharp does not find anything.

@FlorianRappl
Copy link
Contributor

I will look into it :)

@FlorianRappl
Copy link
Contributor

Obviously this is no selector bug, but rather a bug in the HTML parsing. Has to be fixed. As this is a major bug I will also release a new version on NuGet.

@FlorianRappl
Copy link
Contributor

The issue was found an fixed. Thanks for your report!

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

No branches or pull requests

2 participants