yaml-repair 0.1.0

Repair messy YAML emitted by LLMs: strip markdown fences, tabs->spaces, dedent leading whitespace, normalize line endings. Returns cleaned text suitable for any YAML parser. Zero deps.
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented1 out of 2 items with examples
  • Size
  • Source code size: 19.92 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 247.46 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 24s Average build duration of successful builds.
  • all releases: 24s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • MukundaKatta/yaml-repair
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • MukundaKatta

yaml-repair

crates.io

Repair messy YAML emitted by LLMs into something a real YAML parser will accept.

use yaml_repair::repair;
let raw = "```yaml\n  name: Claude\n  tools:\n    - read\n```";
let fixed = repair(raw);
// fixed parses with serde_yaml / saphyr

Strips ``` fences, normalizes CRLF, converts leading tabs to spaces, dedents, trims trailing whitespace. Zero deps. MIT or Apache-2.0.