소스 검색

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 5 년 전
부모
커밋
f0c94758f4
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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())
             return {};
 
-        if (peek() == '{' || peek() == ',')
+        if (peek() == '{' || peek() == ',' || is_combinator(peek()))
             return {};
 
         Selector::SimpleSelector::Type type;