pub struct MarkdownParser;Expand description
Parses markdown into structured components.
Uses pulldown-cmark for compliant CommonMark parsing. Extracts headings, links, body text, and logical sections.
Implementations§
Source§impl MarkdownParser
impl MarkdownParser
Sourcepub fn parse(
body: &str,
) -> (Vec<Heading>, Vec<Link>, String, Vec<Section>, Vec<Table>, Vec<CodeBlock>)
pub fn parse( body: &str, ) -> (Vec<Heading>, Vec<Link>, String, Vec<Section>, Vec<Table>, Vec<CodeBlock>)
Parse markdown body into headings, links, plain text, sections, tables, and code blocks.
Returns a tuple of:
Vec<Heading>- All headings with level, title, anchor, positionVec<Link>- All links (wiki-style and standard) with raw textString- Plain text body for search indexingVec<Section>- Logical sections (heading + content) for granular searchVec<Table>- All tables with headers, rows, and alignmentsVec<CodeBlock>- All fenced code blocks with language and optional filename
Auto Trait Implementations§
impl Freeze for MarkdownParser
impl RefUnwindSafe for MarkdownParser
impl Send for MarkdownParser
impl Sync for MarkdownParser
impl Unpin for MarkdownParser
impl UnsafeUnpin for MarkdownParser
impl UnwindSafe for MarkdownParser
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more