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

Allow numbers in descendant-combined type selectors (fix #1836) #1837

Merged
merged 7 commits into from
Feb 20, 2023

Conversation

davep
Copy link
Contributor

@davep davep commented Feb 19, 2023

This fixes #1836; it'll also help folk style a Markdown with a bit more specificity too.

NOTE: Looks like we may need some tests around this sort of thing; I would have added one for this problem as part of this PR but it wasn't clear to me where in the tests it should go, or indeed if we have any around this right now. We may want to review this as part of this or as a followup.

@davep davep added the bug Something isn't working label Feb 19, 2023
@willmcgugan
Copy link
Collaborator

A reasonable test might be to have some CSS that we know should parse, and see if it parses without errors.

@davep
Copy link
Contributor Author

davep commented Feb 19, 2023

A reasonable test might be to have some CSS that we know should parse, and see if it parses without errors.

@willmcgugan Is there a spot in the tests for that sort of thing right now? I went looking, wanting to fit this in, but couldn't obviously see anything. If not I'll kick some testing off based around this.

@willmcgugan
Copy link
Collaborator

Don't believe so. Worth adding I think. Just one big string with known rules and edge cases.

@davep
Copy link
Contributor Author

davep commented Feb 19, 2023

Cool. Sounds worthwhile. Will do.

@davep
Copy link
Contributor Author

davep commented Feb 20, 2023

Actually, on second look, it looks like tests/css/test_parse.py was the obvious place to add some tests.

Copy link
Contributor

@rodrigogiraoserrao rodrigogiraoserrao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the typo you can fix in a jiffy, looks good to me!

tests/css/test_parse.py Outdated Show resolved Hide resolved
tests/css/test_parse.py Outdated Show resolved Hide resolved
davep and others added 3 commits February 20, 2023 21:24
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
@davep davep merged commit 8925a0b into Textualize:main Feb 20, 2023
@davep davep deleted the bug/1836/selector-continue branch February 20, 2023 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CSS] Descendant type selectors can't have a numeric in their name
3 participants