Module skip_context

Module skip_context 

Source
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§

ByteRange
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_inline_math
Check if a byte position is within inline math ($…$)
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_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_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