LibHTML: Tolerate empty CSS rules

A rule that contains nothing but whitespace is still a valid rule.
This commit is contained in:
Andreas Kling 2019-11-19 18:23:18 +01:00
parent 56dad2272c
commit 1fd5869490
Notes: sideshowbarker 2024-07-19 11:08:28 +09:00

View file

@ -329,6 +329,8 @@ public:
consume_one();
return {};
}
if (peek() == '}')
return {};
buffer.clear();
while (is_valid_property_name_char(peek()))
buffer.append(consume_one());