Expand description
Utilities for determining if a position in markdown should be skipped from processing
This module provides centralized context detection for various markdown constructs that should typically be skipped when processing rules.
Structs§
- Byte
Range - Range representing a span of bytes (start inclusive, end exclusive)
Functions§
- compute_
html_ comment_ ranges - Pre-compute all HTML comment ranges in the content Returns a sorted vector of byte ranges for efficient lookup
- is_
in_ front_ matter - Check if a line is within front matter (both YAML and TOML)
- is_
in_ html_ comment - Check if a byte position is within an HTML comment
- is_
in_ html_ comment_ ranges - Check if a byte position is within any of the pre-computed HTML comment ranges Uses binary search for O(log n) complexity
- is_
in_ html_ tag - Check if a byte position is within an HTML tag
- is_
in_ icon_ shortcode - Check if a byte position is within an MkDocs icon shortcode
Icon shortcodes use format like
:material-check:,:octicons-mark-github-16: - is_
in_ inline_ math - Check if a byte position is within inline math ($…$)
- is_
in_ jsx_ expression - Check if a byte position is within a JSX expression (MDX: {expression})
- is_
in_ math_ block - Check if a byte position is within a math block ($$…$$)
- is_
in_ math_ context - Check if a byte position is within a math context (block or inline)
- is_
in_ mdx_ comment - Check if a byte position is within an MDX comment ({/* … */})
- is_
in_ mkdocs_ markup - Check if a byte position is within any MkDocs-specific markup Combines icon shortcodes and PyMdown extensions
- is_
in_ pymdown_ markup - Check if a byte position is within PyMdown extension markup Includes: Keys (++ctrl+alt++), Caret (^text^), Insert (^^text^^), Mark (==text==)
- is_
in_ skip_ context - Check if a byte position is within any context that should be skipped
- is_
in_ table_ cell - Check if a position is within a table cell
- is_
line_ entirely_ in_ html_ comment - Check if a line is ENTIRELY within a single HTML comment Returns true only if both the line start AND end are within the same comment range
- is_
mkdocs_ admonition_ line - Check if a line is a MkDocs admonition marker
- is_
mkdocs_ critic_ line - Check if a line contains MkDocs Critic Markup
- is_
mkdocs_ footnote_ line - Check if a line is a MkDocs footnote definition
- is_
mkdocs_ snippet_ line - Check if a line should be skipped due to MkDocs snippet syntax
- is_
mkdocs_ tab_ line - Check if a line is a MkDocs tab marker
- is_
mkdocstrings_ autodoc_ line - Check if a line is a MkDocstrings autodoc marker
- is_
table_ line - Check if a line contains table syntax