pub struct LineFilterConfig {Show 18 fields
pub skip_front_matter: bool,
pub skip_code_blocks: bool,
pub skip_html_blocks: bool,
pub skip_html_comments: bool,
pub skip_mkdocstrings: bool,
pub skip_esm_blocks: bool,
pub skip_math_blocks: bool,
pub skip_quarto_divs: bool,
pub skip_jsx_expressions: bool,
pub skip_mdx_comments: bool,
pub skip_admonitions: bool,
pub skip_content_tabs: bool,
pub skip_mkdocs_html_markdown: bool,
pub skip_definition_lists: bool,
pub skip_obsidian_comments: bool,
pub skip_pymdown_blocks: bool,
pub skip_kramdown_extension_blocks: bool,
pub skip_div_markers: 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()
.skip_mkdocstrings()
.skip_esm_blocks()
.skip_quarto_divs();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
skip_mkdocstrings: boolSkip lines inside mkdocstrings blocks
skip_esm_blocks: boolSkip lines inside ESM (ECMAScript Module) blocks
skip_math_blocks: boolSkip lines inside math blocks ($$ … $$)
skip_quarto_divs: boolSkip lines inside Quarto div blocks (::: … :::)
skip_jsx_expressions: boolSkip lines containing or inside JSX expressions (MDX: {expression})
skip_mdx_comments: boolSkip lines inside MDX comments ({/* … */})
skip_admonitions: boolSkip lines inside MkDocs admonitions (!!! or ???)
skip_content_tabs: boolSkip lines inside MkDocs content tabs (=== “Tab”)
skip_mkdocs_html_markdown: boolSkip lines inside HTML blocks with markdown attribute (MkDocs grid cards, etc.)
skip_definition_lists: boolSkip lines inside definition lists (: definition)
skip_obsidian_comments: boolSkip lines inside Obsidian comments (%%…%%)
skip_pymdown_blocks: boolSkip lines inside PyMdown Blocks (/// … ///, MkDocs flavor only)
skip_kramdown_extension_blocks: boolSkip lines inside kramdown extension blocks ({::comment}…{:/comment}, etc.)
skip_div_markers: boolSkip lines that are div markers (::: opening or closing)
Unlike skip_quarto_divs which skips ALL content inside divs,
this only skips the marker lines themselves (structural delimiters)
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.
Sourcepub fn skip_mkdocstrings(self) -> Self
pub fn skip_mkdocstrings(self) -> Self
Skip lines inside mkdocstrings blocks
Mkdocstrings blocks contain auto-generated documentation and most markdown rules should not process them.
Sourcepub fn skip_esm_blocks(self) -> Self
pub fn skip_esm_blocks(self) -> Self
Skip lines inside ESM (ECMAScript Module) blocks
ESM blocks contain JavaScript/TypeScript module code and most markdown rules should not process them.
Sourcepub fn skip_math_blocks(self) -> Self
pub fn skip_math_blocks(self) -> Self
Skip lines inside math blocks ($$ … $$)
Math blocks contain LaTeX/mathematical notation and markdown rules should not process them as regular markdown content.
Sourcepub fn skip_quarto_divs(self) -> Self
pub fn skip_quarto_divs(self) -> Self
Skip lines inside Quarto div blocks (::: … :::)
Quarto divs are fenced containers for callouts, panels, and other structured content. Rules may need to skip them for accurate processing.
Sourcepub fn skip_jsx_expressions(self) -> Self
pub fn skip_jsx_expressions(self) -> Self
Skip lines containing or inside JSX expressions (MDX: {expression})
JSX expressions contain JavaScript code and most markdown rules should not process them as regular markdown content.
Sourcepub fn skip_mdx_comments(self) -> Self
pub fn skip_mdx_comments(self) -> Self
Skip lines inside MDX comments ({/* … */})
MDX comments are metadata and should not be processed by most markdown linting rules.
Sourcepub fn skip_admonitions(self) -> Self
pub fn skip_admonitions(self) -> Self
Skip lines inside MkDocs admonitions (!!! or ???)
Admonitions are callout blocks and may have special formatting that rules should not process as regular content.
Sourcepub fn skip_content_tabs(self) -> Self
pub fn skip_content_tabs(self) -> Self
Skip lines inside MkDocs content tabs (=== “Tab”)
Content tabs contain tabbed content that may need special handling.
Sourcepub fn skip_mkdocs_html_markdown(self) -> Self
pub fn skip_mkdocs_html_markdown(self) -> Self
Skip lines inside HTML blocks with markdown attribute (MkDocs grid cards, etc.)
These blocks contain markdown-enabled HTML which may have custom styling rules.
Sourcepub fn skip_mkdocs_containers(self) -> Self
pub fn skip_mkdocs_containers(self) -> Self
Skip lines inside any MkDocs container (admonitions, content tabs, or markdown HTML divs)
This is a convenience method that enables skip_admonitions,
skip_content_tabs, and skip_mkdocs_html_markdown. MkDocs containers use
4-space indented content which may need special handling to preserve structure.
Sourcepub fn skip_definition_lists(self) -> Self
pub fn skip_definition_lists(self) -> Self
Skip lines inside definition lists (: definition)
Definition lists have special formatting that rules should not process as regular content.
Sourcepub fn skip_obsidian_comments(self) -> Self
pub fn skip_obsidian_comments(self) -> Self
Skip lines inside Obsidian comments (%%…%%)
Obsidian comments are content hidden from rendering and most markdown rules should not process them.
Sourcepub fn skip_pymdown_blocks(self) -> Self
pub fn skip_pymdown_blocks(self) -> Self
Skip lines inside PyMdown Blocks (/// … ///)
PyMdown Blocks are structured content blocks used by the PyMdown Extensions library for captions, collapsible details, admonitions, and other features. Rules may need to skip them for accurate processing.
Sourcepub fn skip_kramdown_extension_blocks(self) -> Self
pub fn skip_kramdown_extension_blocks(self) -> Self
Skip lines inside kramdown extension blocks ({::comment}…{:/comment}, {::nomarkdown}…{:/nomarkdown})
Kramdown extension blocks contain content that should not be processed as regular markdown (comments, raw HTML, options directives).
Sourcepub fn skip_div_markers(self) -> Self
pub fn skip_div_markers(self) -> Self
Skip lines that are div markers (::: opening or closing)
Unlike skip_quarto_divs which skips ALL lines inside a div block,
this only skips the ::: marker lines themselves. Use this when you
want to process content inside divs but treat markers as block boundaries.
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