extract_from_markdown

Function extract_from_markdown 

Source
fn extract_from_markdown<T>(
    markdown: &[MarkdownDoc],
    kind: FenceKind,
    parser: impl Fn(Option<&str>, &str) -> Result<T, ConfigError>,
) -> Result<Vec<T>, PackError>
Expand description

Generic helper that extracts items from Markdown fence blocks.

Scans all documents, users, and blocks for blocks matching kind, then calls parser on each match. This eliminates the repeated triple-nested loop that was duplicated across the six typed extraction functions.