1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:37:35 +00:00

LibWeb: Remove pointless brackets from Length::to_string()

Since we expose these strings to web content via LengthStyleValue,
let's not have non-standard brackets in there to confuse anyone trying
to parse these values. :^)
This commit is contained in:
Andreas Kling 2021-10-03 17:58:19 +02:00
parent 956968d4b2
commit c4be098b7d

View file

@ -141,8 +141,8 @@ public:
String to_string() const
{
if (is_auto())
return "[auto]";
return String::formatted("[{} {}]", m_value, unit_name());
return "auto";
return String::formatted("{}{}", m_value, unit_name());
}
bool operator==(const Length& other) const