diff --git a/src/ast.rs b/src/ast.rs index 0b136cfa..a48a856d 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -43,6 +43,7 @@ pub enum ComponentValue { Colon, // : Semicolon, // ; Comma, // , + Slash, // / IncludeMatch, // ~= DashMatch, // |= PrefixMatch, // ^= diff --git a/src/serializer.rs b/src/serializer.rs index 7a9bf08e..ed30ce7f 100644 --- a/src/serializer.rs +++ b/src/serializer.rs @@ -60,6 +60,7 @@ pub fn to_css_push(component_value: &ComponentValue, css: &mut String) { Colon => css.push(':'), Semicolon => css.push(';'), Comma => css.push(','), + Slash => css.push('/'), IncludeMatch => css.push_str("~="), DashMatch => css.push_str("|="), PrefixMatch => css.push_str("^="), diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 9f384f22..7659c2fd 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -164,6 +164,7 @@ fn next_component_value(tokenizer: &mut Tokenizer) -> Option { } }, ',' => { tokenizer.position += 1; Comma }, + '/' => { tokenizer.position += 1; Slash }, '-' => { if ( tokenizer.position + 1 < tokenizer.length