1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
//! # markdown-ai-cite-remove
//!
//! **Remove AI-generated citations and annotations from Markdown text**
//!
//! High-performance Rust library for removing citations from 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::remove_citations;
//!
//! let markdown = "AI research shows promise[1][2].\n\n[1]: https://example.com\n[2]: https://test.com";
//! let result = remove_citations(markdown);
//! assert_eq!(result.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::{CitationRemover, RemoverConfig};
//!
//! let config = RemoverConfig {
//! remove_inline_citations: true,
//! remove_reference_links: true,
//! ..Default::default()
//! };
//!
//! let remover = CitationRemover::with_config(config);
//! let result = remover.remove("Text with citations[1].");
//! ```
pub use ;
pub use ;
pub use CitationRemover;
/// Main entry point - remove citations from markdown with default settings
///
/// # Examples
///
/// ```
/// use markdown_ai_cite_remove::remove_citations;
///
/// let input = "Recent research[1][2] shows promise[3].";
/// let output = remove_citations(input);
/// assert_eq!(output, "Recent research shows promise.");
/// ```
/// Remove citations from markdown with custom configuration
///
/// # Examples
///
/// ```
/// use markdown_ai_cite_remove::{remove_citations_with_config, RemoverConfig};
///
/// let config = RemoverConfig::inline_only();
/// let input = "Text[1] here.\n\nSome content.";
/// let output = remove_citations_with_config(input, config);
/// assert_eq!(output.trim(), "Text here.\n\nSome content.");
/// ```