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

Return appropriate tuple for string-set:none #975

Merged
merged 1 commit into from Nov 7, 2019

Conversation

@Tontyna
Copy link
Contributor

Tontyna commented Oct 22, 2019

This snippet used to crash WeasyPrint with UnboundLocalError: local variable 'computed_value' referenced before assignment:

<style>
div {
  string-set: none;
}
</style>
<div>OMG</div>

Reason being the tuple-constructor in computed_values.string_set() splitting 'none' instead of a tuple consiting of a string-name and its string-value.

BTW: WeasyPrint's unconventional way of handling string-set enables declarations like string-set: none, stringname "value";.

@liZe liZe merged commit 4677318 into Kozea:master Nov 7, 2019
1 check failed
1 check failed
continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
@liZe

This comment has been minimized.

Copy link
Member

liZe commented Nov 7, 2019

Of course, thank you

@liZe liZe added this to the 51 milestone Nov 7, 2019
@liZe liZe added the crash label Nov 7, 2019
@Tontyna Tontyna deleted the Tontyna:string-set-crash branch Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.