markdown-chunk 0.1.0

Split Markdown into RAG-friendly chunks that respect heading hierarchy. Keeps each chunk under a soft char cap; never splits inside a fenced code block. Zero deps.
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented1 out of 2 items with examples
  • Size
  • Source code size: 18.52 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 243.49 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 13s Average build duration of successful builds.
  • all releases: 13s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • MukundaKatta/markdown-chunk
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • MukundaKatta

markdown-chunk

crates.io

Heading-aware Markdown chunker for RAG. Splits at ATX headings, never splits inside ``` fenced code blocks.

use markdown_chunk::chunk;
let md = "# T\n## A\nbody A\n## B\nbody B";
let chunks = chunk(md, 200);

Zero deps. MIT or Apache-2.0.