Expand description
The extensions module contains custom block and table extensions.
Extension functionality for the MDX Gen library.
This module provides utilities for enhancing Markdown processing,
including custom block handling and table formatting.
Syntax highlighting has moved to crate::highlight.
Structs§
- Custom
Block Config - Configuration for custom block rendering.
- Heading
- A single heading discovered in a Markdown document.
Enums§
- Column
Alignment - Alignment options for table columns.
- Custom
Block Type - Represents different types of custom blocks.
Functions§
- collect_
all_ text - Recursively concatenates the plain-text content of a node’s subtree, stripping all Markdown and HTML markup. Blocks are separated by whitespace to prevent words from merging.
- collect_
headings - Walks the AST and returns one
Headingper heading node, in document order. - enhance_
table_ nodes - Walks the comrak AST and replaces
Tablenodes withHtmlBlocknodes containing responsive-wrapped, class-enhanced table HTML. - process_
custom_ block_ nodes - Walks the comrak AST and transforms
HtmlBlocknodes that contain known custom block divs into styled alert HTML. - process_
custom_ blocks - Processes custom blocks in an HTML string.
- process_
tables - Processes tables, enhancing them with responsive design and alignment classes.