markdown-strip 0.1.0

Strip Markdown formatting (headers, bold, italic, links, code, blockquotes) to plain text. Conservative, fast, zero deps.
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented1 out of 2 items with examples
  • Size
  • Source code size: 23.95 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 258.37 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 18s Average build duration of successful builds.
  • all releases: 18s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • MukundaKatta/markdown-strip
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • MukundaKatta

markdown-strip

crates.io

Strip Markdown formatting to plain text. Conservative, fast, zero deps. Use it to feed LLM output into TTS, keyword matching, or analytics.

use markdown_strip::strip_markdown;
let md = "## Hello\n\n**bold** and *italic* with `code` and [a link](https://x).";
assert_eq!(strip_markdown(md), "Hello\n\nbold and italic with code and a link.");

Handles ATX headers, bold/italic, inline code, fenced code blocks (body preserved), links (text kept, URL dropped), images (alt kept), blockquote markers, and bullet/number list markers.

MIT or Apache-2.0.