kdl-rs icon indicating copy to clipboard operation
kdl-rs copied to clipboard

Rust parser for KDL

Results 29 kdl-rs issues
Sort by recently updated
recently updated
newest added

A lot easier than #55, actually Includes/closes #53; redoes #49 properly. cc @cbiffle one last time

Closes #53 (built on top of it), closes #54 This PR takes the approach that calling `fmt` should always fully fill in the `leading`/`trailing` fields to be explicit. A separate...

```rust fn build_abc() -> KdlDocument { let mut c = KdlNode::new("c"); c.ensure_children(); let mut b = KdlNode::new("b"); b.ensure_children().nodes_mut().push(c); let mut a = KdlNode::new("a"); a.ensure_children().nodes_mut().push(b); let mut doc = KdlDocument::new(); doc.nodes_mut().push(a);...

In order, - Updates the test to pass on main (4ac459a) - Reverts #49 and the format mangling resulting from it (f820145) - Adds a new test showing the case...

```rust fn main() { let test = r#" // Nodes can be separated into multiple lines title \ "Some title" // Files must be utf8 encoded! smile "😁" // Instead...

bug
good first issue
help wanted

This should make the CI happier

Steps to reproduce: ```rust use kdl::{KdlIdentifier, KdlNode}; use std::fmt::Display; // crates/core/src/config.rs:266:22 | 266 | section_node.fmt(); | ^^^- supplied 0 arguments | | | expected 1 argument | note: associated function...

Currently, we pretty much just throw floats at `format!("{:?}")` and call it a day. Unfortunately, this yields different results depending on Rust version (for example, 1.56 vs 1.60, so not...

enhancement
good first issue
help wanted

There should be a nice query API (possibly/probably using KQL?) to fetch individual nodes or sets of nodes.

enhancement