diff --git a/src/stylesheet.rs b/src/stylesheet.rs index 93bcc10..dcd58f2 100644 --- a/src/stylesheet.rs +++ b/src/stylesheet.rs @@ -155,7 +155,7 @@ fn is_selector_char(c: char) -> bool { c.is_alphanumeric() || matches!( c, - '_' | '-' | '[' | '#' | ':' | '*' | '%' | '.' | '>' | '\\' + '_' | '-' | '[' | '#' | ':' | '*' | '%' | '.' | '>' | '\\' | '+' ) } diff --git a/tests/selectors.rs b/tests/selectors.rs index d0b8212..70b70ed 100644 --- a/tests/selectors.rs +++ b/tests/selectors.rs @@ -525,3 +525,8 @@ test!( "ā„“ {\n color: red;\n}\n", "@charset \"UTF-8\";\nā„“ {\n color: red;\n}\n" ); +test!( + plus_in_selector, + "+ {\n color: &;\n}\n", + "+ {\n color: +;\n}\n" +);