diff --git a/kaydle-primitives/src/node.rs b/kaydle-primitives/src/node.rs index d65797b..24c8e39 100644 --- a/kaydle-primitives/src/node.rs +++ b/kaydle-primitives/src/node.rs @@ -497,7 +497,12 @@ impl<'i> NodeList<'i> for Children<'i, '_> { ) } - self.run_parser(parse_node_start(char('}').value(()))) + let child_terminator = char('}') + .value(()) + .precedes(parse_node_space.opt()) + .precedes(char(';').opt().value(())); + + self.run_parser(parse_node_start(child_terminator)) .map(|opt_name| match opt_name { // None here means that we successfully parsed the end-of-children. Inform the parent. None => { @@ -532,6 +537,7 @@ fn test_full_document_drain() { items { a /* An important note here */ "abc" d "def"; g "ghi" + z { a; b { c; }; } } } (annotated)node2