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

Using frozenset with lists to avoid problems. #80

Closed
wants to merge 1 commit into from

Conversation

tonylopes
Copy link
Contributor

It makes more sense to pass lists to frozensets since tuples need special syntax to be interpreted correctly in this context. For instance, the line "hr": frozenset(("noshade")) has a bug. It won't produce a frozenset with "noshade" but with ['a', 'e', 'd', 'h', 'o', 'n', 's'] because if you forget to add a comma at the end, the tuple won't be an iterable but the string is it interprets is.

It makes more sense to pass lists to frozensets since tuples need special syntax to be interpreted correctly in this context. For instance, the line  "hr": frozenset(("noshade")) has a bug. It won't produce a frozenset with "noshade" but with ['a', 'e', 'd', 'h', 'o', 'n', 's'] because if you forget to add a comma at the end, the tuple won't be an iterable but the string is it interprets is.
@hoppipolla-critic-bot
Copy link

Critic review: https://critic.hoppipolla.co.uk/r/188

This is an external review system which you may optionally use for the code review of your pull request.

@gsnedders
Copy link
Member

This needs tests (esp. given the bug with hr), though that's really a matter for html5lib-tests.

@gsnedders
Copy link
Member

Tests: <hr n>, <hr n=b>, <hr n=n>, <hr noshade>, <hr noshade=b>, <hr noshade=noshade>.

@gsnedders
Copy link
Member

Rebased and merged into master as a98f8a6

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

Successfully merging this pull request may close these issues.

None yet

3 participants