Parcourir la source

LibHTML: CSS parser should accept "foo>bar", not just "foo > bar"

If we peek a combinator at the start of a simple selector, we're seeing
the start of a new complex selector.
Andreas Kling il y a 5 ans
Parent
commit
f0c94758f4
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      Libraries/LibHTML/Parser/CSSParser.cpp

+ 1 - 1
Libraries/LibHTML/Parser/CSSParser.cpp

@@ -207,7 +207,7 @@ public:
         if (consume_whitespace_or_comments())
         if (consume_whitespace_or_comments())
             return {};
             return {};
 
 
-        if (peek() == '{' || peek() == ',')
+        if (peek() == '{' || peek() == ',' || is_combinator(peek()))
             return {};
             return {};
 
 
         Selector::SimpleSelector::Type type;
         Selector::SimpleSelector::Type type;