Expand description
PyMdown Extensions Blocks detection utilities
This module provides detection for PyMdown Extensions “Blocks” syntax which uses
/// markers to create structured content blocks.
Common patterns:
/// caption- Caption block for figures/tables/// details | Summary title- Collapsible content/// admonition | Title- Admonition with custom title/// html | div- HTML wrapper block///- Closing marker
Blocks can have YAML options indented 4 spaces after the header line:
/// caption
attrs: {id: my-id}
Caption text
///Supported block types: caption, figure-caption, details, admonition, html, definition, tab
Structs§
- Block
Tracker - Track block nesting state for a document
Functions§
- detect_
block_ ranges - Detect PyMdown block ranges in content Returns a vector of byte ranges (start, end) for each block
- extract_
block_ args - Extract arguments from a block opening line (text after |)
- extract_
block_ type - Extract the block type from an opening line Returns the block type like “caption”, “details”, “admonition”, etc.
- get_
block_ indent - Get the indentation level of a block marker
- is_
block_ close - Check if a line is a block closing marker (just
///) - is_
block_ open - Check if a line is a block opening marker
- is_
within_ block_ ranges - Check if a byte position is within a block