You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 18, 2019. It is now read-only.
parse_stylesheet expects a string. Some of the things it does with it is getting its length with len(css_source) and indexing it to get a character with char = css_source[pos] where pos is an integer. These happen to work on a list, but that’s an accident. With a string char is a character represented as a string whose length is always 1. In some cases like this one, pos is incremented by len(char) which is normally 1. But with a list containing an empty string, pos is incremented by 0 and the next iteration of the loop does the same thing again. And you get an infinite loop.
Maybe we can tweak the code so that this situation raises an exception instead of looping infinitely. But calling parse_stylesheet with a list rather than a string is always an error in the first place.
The text was updated successfully, but these errors were encountered: