fix(parser): allow trailing space after node

This commit is contained in:
Franck Parat 2026-03-17 10:15:25 +01:00
parent dd44f5be42
commit 47a11b3a7d
3 changed files with 13 additions and 0 deletions

View File

@ -414,6 +414,7 @@ fn base_node(input: &mut Input<'_>) -> PResult<KdlNode> {
)
.parse_next(input)?
};
node_space0.parse_next(input)?;
let (before_inner_ty, ty, after_inner_ty) = ty.unwrap_or_default();
let (before_children, children) = children
.map(|(before_children, children)| (before_children.into(), Some(children)))

View File

@ -0,0 +1,6 @@
node1 {
child
}
node2 {
child
}

View File

@ -0,0 +1,6 @@
node1 {
child
}
node2 {
child
}