| Crates.io | strip-codeblocks |
| lib.rs | strip-codeblocks |
| version | 0.1.0 |
| created_at | 2025-12-01 03:06:17.726776+00 |
| updated_at | 2025-12-01 03:06:17.726776+00 |
| description | A Rust library to strip markdown code blocks from text, preserving only the inner content |
| homepage | |
| repository | https://github.com/fileng87/strip-codeblocks |
| max_upload_size | |
| id | 1959224 |
| size | 12,214 |
A Rust library to strip markdown fenced code blocks from text while preserving the inner content and leaving inline code blocks untouched.
Add this to your Cargo.toml:
[dependencies]
strip-codeblocks = "0.1.0"
use strip_codeblocks::strip_codeblocks;
let markdown = "Some text.\n\n```rust\nfn main() {}\n```\n\nMore text with `inline code`.";
let result = strip_codeblocks(markdown);
// Result: "Some text.\n\nfn main() {}\n\nMore text with `inline code`."
MIT - see LICENSE file for details