From 2fec6b5edd6758fe49bf99d267e639ad2187c5fc Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Sun, 10 Nov 2024 18:10:12 +0000 Subject: [PATCH] (ast/syntax) fix simpleblock parsing --- crates/hdx_ast/src/css/stylerule.rs | 1 + crates/hdx_ast/src/syntax.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/crates/hdx_ast/src/css/stylerule.rs b/crates/hdx_ast/src/css/stylerule.rs index c0880e9..4ad2aea 100644 --- a/crates/hdx_ast/src/css/stylerule.rs +++ b/crates/hdx_ast/src/css/stylerule.rs @@ -112,6 +112,7 @@ mod tests { assert_parse!(StyleRule, "body {\n\topacity: 0;\n}"); assert_parse!(StyleRule, ".foo *{}", ".foo * {\n}"); assert_parse!(StyleRule, ":nth-child(1) {\n\topacity: 0;\n}"); + assert_parse!(StyleRule, ".foo {\n\t--bar: (baz);\n}"); } #[test] diff --git a/crates/hdx_ast/src/syntax.rs b/crates/hdx_ast/src/syntax.rs index 8ebe574..7e0259d 100644 --- a/crates/hdx_ast/src/syntax.rs +++ b/crates/hdx_ast/src/syntax.rs @@ -193,6 +193,7 @@ impl<'a> Parse<'a> for SimpleBlock<'a> { } if let Some(token) = parser.peek::() { if token.to_pairwise() == pair.to_pairwise() { + parser.hop(token); break; } }