1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-02 23:22:07 +00:00

LibWeb: Stop adding extra whitespace when serializing CSS Functions

Otherwise `attr(|name, "fallback")` becomes `attr(| name ,  "fallback")`

The test here is slightly aspirational. There are other rules for
serialization we don't follow (like stripping whitespace entirely from
many places) so these are marked with FIXMEs.
This commit is contained in:
Sam Atkins 2023-09-19 20:45:28 +01:00 committed by Andreas Kling
parent f31b39ca18
commit 0634d11318
3 changed files with 32 additions and 1 deletions

View file

@ -24,7 +24,8 @@ String Function::to_string() const
serialize_an_identifier(builder, m_name);
builder.append('(');
builder.join(' ', m_values);
for (auto& item : m_values)
builder.append(item.to_string());
builder.append(')');
return MUST(builder.to_string());