pub struct BlockquoteUtils;Expand description
Utility functions for detecting and handling blockquotes in Markdown documents
Implementations§
Source§impl BlockquoteUtils
impl BlockquoteUtils
Sourcepub fn is_blockquote(line: &str) -> bool
pub fn is_blockquote(line: &str) -> bool
Check if a line is a blockquote
Sourcepub fn is_empty_blockquote(line: &str) -> bool
pub fn is_empty_blockquote(line: &str) -> bool
Check if a line is an empty blockquote (> with no content)
Sourcepub fn needs_md028_fix(line: &str) -> bool
pub fn needs_md028_fix(line: &str) -> bool
Check if an empty blockquote line needs fixing for MD028 This is more restrictive than is_empty_blockquote - only flags lines that actually need fixing
Sourcepub fn has_no_space_after_marker(line: &str) -> bool
pub fn has_no_space_after_marker(line: &str) -> bool
Check if a blockquote line has no space after the > marker
Sourcepub fn has_multiple_spaces_after_marker(line: &str) -> bool
pub fn has_multiple_spaces_after_marker(line: &str) -> bool
Check if a blockquote line has multiple spaces after the > marker
Sourcepub fn is_nested_blockquote(line: &str) -> bool
pub fn is_nested_blockquote(line: &str) -> bool
Check if a line is a nested blockquote
Sourcepub fn get_nesting_level(line: &str) -> usize
pub fn get_nesting_level(line: &str) -> usize
Get the nesting level of a blockquote line
Sourcepub fn extract_content(line: &str) -> String
pub fn extract_content(line: &str) -> String
Extract the content of a blockquote line
Sourcepub fn extract_indentation(line: &str) -> String
pub fn extract_indentation(line: &str) -> String
Extract the indentation of a blockquote line
Sourcepub fn fix_blockquote_spacing(line: &str) -> String
pub fn fix_blockquote_spacing(line: &str) -> String
Fix a blockquote line to ensure it has exactly one space after the > marker
Sourcepub fn fix_nested_blockquote_spacing(line: &str) -> String
pub fn fix_nested_blockquote_spacing(line: &str) -> String
Fix nested blockquotes to ensure each level has exactly one space after the > marker
Sourcepub fn has_blank_between_blockquotes(content: &str) -> Vec<usize>
pub fn has_blank_between_blockquotes(content: &str) -> Vec<usize>
Check if there are blank lines between blockquotes
Sourcepub fn fix_blank_between_blockquotes(content: &str) -> String
pub fn fix_blank_between_blockquotes(content: &str) -> String
Fix blank lines between blockquotes by removing them
Sourcepub fn get_blockquote_start_col(line: &str) -> usize
pub fn get_blockquote_start_col(line: &str) -> usize
Get the starting column of the blockquote marker ‘>’
Sourcepub fn get_blockquote_content(line: &str) -> String
pub fn get_blockquote_content(line: &str) -> String
Get the content after the blockquote marker
Auto Trait Implementations§
impl Freeze for BlockquoteUtils
impl RefUnwindSafe for BlockquoteUtils
impl Send for BlockquoteUtils
impl Sync for BlockquoteUtils
impl Unpin for BlockquoteUtils
impl UnwindSafe for BlockquoteUtils
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more