You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to write a CLI, that formats KDL documents. Therefore I want to use the KdlDocument::fmt() function to achieve this.
While writing the first little unit test, I found a weird behaviour within the format output. When the following document is formatted, only the first node is indented correctly.
Input
worldprop="value"{child1
child 2}
Output
worldprop="value"{child1
child 2}
Expected Output
worldprop="value"{child1
child 2}
Is the expected behaviour intended? For testing the issue, here is the source code for reproduction. Please feel free to message me in case you need some more details.
oh huh. Thanks for the report. I'm rewriting the formatting stuff as part of the new kdlv2 parser rewrite, so I'll make sure this works this time around!
When the KdlDocument is created manually within the Rust function, it seems to format properly. So I'm not sure whether it's a bug in the parser or the formatter. Or maybe in a mix of both.
Using KdlDocument::clear_fmt_recursive() results in the correct indentation, but omits comments, as expected.
Hi,
I try to write a CLI, that formats KDL documents. Therefore I want to use the
KdlDocument::fmt()
function to achieve this.While writing the first little unit test, I found a weird behaviour within the format output. When the following document is formatted, only the first node is indented correctly.
Input
Output
Expected Output
Is the expected behaviour intended? For testing the issue, here is the source code for reproduction. Please feel free to message me in case you need some more details.
The text was updated successfully, but these errors were encountered: