pub struct LineFilterConfig {
pub skip_front_matter: bool,
pub skip_code_blocks: bool,
pub skip_html_blocks: bool,
pub skip_html_comments: bool,
}Expand description
Configuration for filtering lines during iteration
Use the builder pattern to configure which types of content should be skipped:
use rumdl_lib::filtered_lines::LineFilterConfig;
let config = LineFilterConfig::new()
.skip_front_matter()
.skip_code_blocks()
.skip_html_blocks()
.skip_html_comments();Fields§
§skip_front_matter: boolSkip lines inside front matter (YAML/TOML/JSON metadata)
skip_code_blocks: boolSkip lines inside fenced code blocks
skip_html_blocks: boolSkip lines inside HTML blocks
skip_html_comments: boolSkip lines inside HTML comments
Implementations§
Source§impl LineFilterConfig
impl LineFilterConfig
Sourcepub fn skip_front_matter(self) -> Self
pub fn skip_front_matter(self) -> Self
Skip lines that are part of front matter (YAML/TOML/JSON)
Front matter is metadata at the start of a markdown file and should not be processed by markdown linting rules.
Sourcepub fn skip_code_blocks(self) -> Self
pub fn skip_code_blocks(self) -> Self
Skip lines inside fenced code blocks
Code blocks contain source code, not markdown, and most rules should not process them.
Sourcepub fn skip_html_blocks(self) -> Self
pub fn skip_html_blocks(self) -> Self
Skip lines inside HTML blocks
HTML blocks contain raw HTML and most markdown rules should not process them.
Sourcepub fn skip_html_comments(self) -> Self
pub fn skip_html_comments(self) -> Self
Skip lines inside HTML comments
HTML comments () are metadata and should not be processed by most markdown linting rules.
Trait Implementations§
Source§impl Clone for LineFilterConfig
impl Clone for LineFilterConfig
Source§fn clone(&self) -> LineFilterConfig
fn clone(&self) -> LineFilterConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LineFilterConfig
impl Debug for LineFilterConfig
Source§impl Default for LineFilterConfig
impl Default for LineFilterConfig
Source§fn default() -> LineFilterConfig
fn default() -> LineFilterConfig
Auto Trait Implementations§
impl Freeze for LineFilterConfig
impl RefUnwindSafe for LineFilterConfig
impl Send for LineFilterConfig
impl Sync for LineFilterConfig
impl Unpin for LineFilterConfig
impl UnwindSafe for LineFilterConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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