Module types

Source
Expand description

This module defines the types used in the markdown parser, including tokens, inline elements, block elements, and a cursor for navigating through tokens.

Structsยง

Delimiter
Manages Delimiter runs in a markdown document. A delimiter run is a sequence of the same character (e.g., *, _, ~) that can be used for bold/italic writing.
MdListItem
Represents a list item in markdown, which can contain block elements.
MdTableCell
Represents a cell in a markdown table.
TokenCursor
Cursor for navigating through a vector of tokens

Enumsยง

MdBlockElement
Represents block-level markdown elements.
MdInlineElement
Represents inline markdown elements (text, bold/italic, link, etc.)
TableAlignment
Represents the alignment of table cells in markdown tables.
Token
Represents the different types of tokens that can be found in a markdown line.

Traitsยง

ToHtml

Functionsยง

clean_id ๐Ÿ”’
Cleans the ID string by removing HTML tags and special characters, and replacing spaces and underscores with hyphens.
is_punctuation ๐Ÿ”’
Helper function to determine if a token is punctuation.
is_whitespace ๐Ÿ”’
Helper function to determine if a token is whitespace or newline.