pub trait MkDocsPattern: Send + Sync {
// Required methods
fn is_marker(&self, line: &str) -> bool;
fn get_indent(&self, line: &str) -> Option<usize>;
fn is_content(&self, line: &str, base_indent: usize) -> bool;
fn is_within_context(&self, content: &str, position: usize) -> bool;
fn name(&self) -> &'static str;
}Expand description
Trait for MkDocs pattern detection implementations All MkDocs features should implement this trait for consistency
Required Methods§
Sourcefn get_indent(&self, line: &str) -> Option<usize>
fn get_indent(&self, line: &str) -> Option<usize>
Get the base indentation level of a marker line
Sourcefn is_content(&self, line: &str, base_indent: usize) -> bool
fn is_content(&self, line: &str, base_indent: usize) -> bool
Check if a line is part of the pattern’s content area
Sourcefn is_within_context(&self, content: &str, position: usize) -> bool
fn is_within_context(&self, content: &str, position: usize) -> bool
Check if a byte position is within this pattern’s context