pub fn extract(content: &str) -> ExtractedExpand description
Extract plain text from content, auto-detecting the format.
Examines the content to determine whether it is HTML or plain text, then applies the appropriate extraction strategy. Plain text and markdown pass through unchanged.
For PDF extraction, use the pdf module (requires the pdf feature).
ยงExamples
let result = deformat::extract("<html><body><p>Hello</p></body></html>");
assert!(result.text.contains("Hello"));
assert_eq!(result.format, deformat::Format::Html);