mirror of
https://github.com/typst/typst
synced 2025-08-03 01:37:54 +08:00
feat: put in assertion to validate all tags are closed
This commit is contained in:
parent
1105e36546
commit
d92e54ac63
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user