Expand description
§markdown-ai-cite-remove
Remove AI-generated citations and annotations from Markdown text
High-performance Rust library for cleaning ChatGPT, Claude, Perplexity, and other AI markdown
responses. Removes inline citations [1][2], reference links [1]: https://..., and
bibliography sections with 100% accuracy.
§Quick Start
use markdown_ai_cite_remove::clean;
let markdown = "AI research shows promise[1][2].\n\n[1]: https://example.com\n[2]: https://test.com";
let cleaned = clean(markdown);
assert_eq!(cleaned.trim(), "AI research shows promise.");§Features
- ✅ Remove inline numeric citations
[1][2][3] - ✅ Remove named citations
[source:1][ref:2] - ✅ Remove reference link lists
[1]: https://... - ✅ Remove reference section headers
## References - ✅ Remove bibliographic entries
- ✅ Preserve markdown formatting
- ✅ Whitespace normalization
- ✅ Ultra-fast performance (100+ MB/s throughput)
§Custom Configuration
use markdown_ai_cite_remove::{CitationCleaner, CleanerConfig};
let config = CleanerConfig {
remove_inline_citations: true,
remove_reference_links: true,
..Default::default()
};
let cleaner = CitationCleaner::with_config(config);
let cleaned = cleaner.clean("Text with citations[1].");Structs§
- Citation
Cleaner - Main citation cleaner
- Cleaner
Config - Configuration options for citation removal
Enums§
- Cleaner
Error - Removal
Mode - Mode for handling different citation styles
Functions§
- clean
- Main entry point - clean markdown with default settings
- clean_
with_ config - Clean markdown with custom configuration