浏览代码

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;