From c4be098b7d9ccbacc9d51bd82ff03ea9d7e734ac Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 3 Oct 2021 17:58:19 +0200 Subject: [PATCH] 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. :^) --- Userland/Libraries/LibWeb/CSS/Length.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/CSS/Length.h b/Userland/Libraries/LibWeb/CSS/Length.h index 615d8cb4a8..f328263427 100644 --- a/Userland/Libraries/LibWeb/CSS/Length.h +++ b/Userland/Libraries/LibWeb/CSS/Length.h @@ -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