From b71b11dccbd42e42551095d2c2828fdfd2575d67 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Wed, 1 Apr 2020 22:31:10 -0400 Subject: [PATCH] selector can start with > --- src/lib.rs | 2 +- tests/selectors.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 33fd261..1daf91e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -283,7 +283,7 @@ impl<'a> StyleSheetParser<'a> { while let Some(Token { kind, .. }) = self.lexer.peek() { match kind { 'a'..='z' | 'A'..='Z' | '_' | '-' - | '[' | '#' | ':' | '*' | '%' | '.' => rules + | '[' | '#' | ':' | '*' | '%' | '.' | '>' => rules .extend(self.eat_rules(&Selector::new(), &mut GLOBAL_SCOPE.with(|s| s.borrow().clone()))?), &'\t' | &'\n' | ' ' => { self.lexer.next(); diff --git a/tests/selectors.rs b/tests/selectors.rs index 57951cd..88bb482 100644 --- a/tests/selectors.rs +++ b/tests/selectors.rs @@ -316,3 +316,5 @@ test!( "ul li#foo {\n foo: bar;\n}\n" ); test!(escaped_space, "a\\ b {\n color: foo;\n}\n"); +// blocked on whitespace +// test!(multiple_consecutive_immediate_child,"> > foo {\n color: foo;\n}\n",);