fix(parser): allow trailing space after node (#151)

This commit is contained in:
stormshield-franckp 2026-03-23 21:57:00 +01:00 committed by GitHub
parent dd44f5be42
commit 6841734233
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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
}