pub struct MarkdownParser;Expand description
Parser for markdown files with YAML frontmatter
Implementations§
Source§impl MarkdownParser
impl MarkdownParser
Sourcepub fn parse(&self, content: &str) -> MarkdownConfigResult<ParsedMarkdown>
pub fn parse(&self, content: &str) -> MarkdownConfigResult<ParsedMarkdown>
Parse markdown content and extract frontmatter and body
Expects frontmatter to be delimited by --- at the start of the file.
Format:
---
yaml: frontmatter
---
# Markdown contentSourcepub fn parse_with_context(
&self,
content: &str,
file_path: Option<&Path>,
) -> MarkdownConfigResult<ParsedMarkdown>
pub fn parse_with_context( &self, content: &str, file_path: Option<&Path>, ) -> MarkdownConfigResult<ParsedMarkdown>
Parse markdown content with file path context for better error messages
Trait Implementations§
Source§impl Clone for MarkdownParser
impl Clone for MarkdownParser
Source§fn clone(&self) -> MarkdownParser
fn clone(&self) -> MarkdownParser
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MarkdownParser
impl Debug for MarkdownParser
Auto Trait Implementations§
impl Freeze for MarkdownParser
impl RefUnwindSafe for MarkdownParser
impl Send for MarkdownParser
impl Sync for MarkdownParser
impl Unpin 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