allow + in selectors

This commit is contained in:
ConnorSkees 2020-05-23 12:06:04 -04:00
parent eca952b201
commit 130177d9fe
2 changed files with 6 additions and 1 deletions

View File

@ -155,7 +155,7 @@ fn is_selector_char(c: char) -> bool {
c.is_alphanumeric() c.is_alphanumeric()
|| matches!( || matches!(
c, c,
'_' | '-' | '[' | '#' | ':' | '*' | '%' | '.' | '>' | '\\' '_' | '-' | '[' | '#' | ':' | '*' | '%' | '.' | '>' | '\\' | '+'
) )
} }

View File

@ -525,3 +525,8 @@ test!(
" {\n color: red;\n}\n", " {\n color: red;\n}\n",
"@charset \"UTF-8\";\n {\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"
);