feat: put in assertion to validate all tags are closed

This commit is contained in:
Tobias Schmitz 2025-08-01 14:23:38 +02:00
parent 1105e36546
commit d92e54ac63
No known key found for this signature in database

View File

@ -75,6 +75,8 @@ impl Tags {
}
pub fn build_tree(&mut self) -> TagTree {
assert!(self.stack.items.is_empty(), "tags weren't properly closed");
let children = std::mem::take(&mut self.tree)
.into_iter()
.map(|node| self.resolve_node(node))