mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
LibHTML: CSS parser should trim whitespace from values
This makes sure that values like "auto !important" don't have a space character after "auto".
This commit is contained in:
parent
e08991319a
commit
39546303da
Notes:
sideshowbarker
2024-07-19 11:39:01 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/39546303dad
1 changed files with 5 additions and 0 deletions
|
@ -292,6 +292,11 @@ public:
|
|||
consume_whitespace_or_comments();
|
||||
while (is_valid_property_value_char(peek()))
|
||||
buffer.append(consume_one());
|
||||
|
||||
// Remove trailing whitespace.
|
||||
while (!buffer.is_empty() && isspace(buffer.last()))
|
||||
buffer.take_last();
|
||||
|
||||
auto property_value = String::copy(buffer);
|
||||
buffer.clear();
|
||||
consume_whitespace_or_comments();
|
||||
|
|
Loading…
Add table
Reference in a new issue