Przeglądaj źródła

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. :^)
Andreas Kling 3 lat temu
rodzic
commit
c4be098b7d
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      Userland/Libraries/LibWeb/CSS/Length.h

+ 2 - 2
Userland/Libraries/LibWeb/CSS/Length.h

@@ -141,8 +141,8 @@ public:
     String to_string() const
     String to_string() const
     {
     {
         if (is_auto())
         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
     bool operator==(const Length& other) const