Skip to main content

Module parser

Module parser 

Source
Expand description

Built-in parsers.

Structs§

AtxHeadingParser
BlockParser for ATX headings.
AutoLinkParser
InlineParser that parses auto links.
BlockquoteParser
BlockParser for blockquotes.
ChainedParserExtension
A parser extension that chains two extensions together.
CodeSpanParser
InlineParser for inline codes.
Context
A context for parsing operations.
ContextOptions
Options for configuring the Context.
Delimiter
Represents a delimiter. A Delimiter is a parse stack element that has same opener and closer characters. CommonMark emphasis syntax uses delimiters.
DelimiterProcessor
Callbacks for processing delimiters.
EmphasisParser
InlineParser for emphasis.
EmptyParserExtension
An empty parser extension that does nothing.
FencedCodeBlockParser
BlockParser for fenced code blocks.
GfmOptions
Options for GitHub Flavored Markdown (GFM).
HtmlBlockParser
BlockParser for html blocks.
IndentedCodeBlockParser
BlockParser for indented code blocks.
LinkParser
InlineParser for links.
LinkReferenceParagraphTransformer
ParagraphTransformer that extracts link reference definitions from paragraphs.
LinkifyOptions
Options for GFM auto links.
LinkifyParser
InlineParser that linkifies URLs and email addresses.
ListItemParser
BlockParser for list items.
ListParser
BlockParser for lists.
NoParserOptions
A default implementation of ParserOptions that does nothing.
NodeIds
A collection of node IDs.
Options
Options for the parser.
ParagraphParser
BlockParser for paragraphs.
ParseStackElemRef
Represents a reference to a element in the parse stack.
Parser
A parser for parsing text into an AST.
ParserConstructorOptions
Options for constructing a parser.
ParserExtensionFn
A parser extension defined by a closure.
RawHtmlParser
InlineParser for inline raw HTML.
SetextHeadingParser
BlockParser for Setext headings.
State
Represents parser’s state.
StrikethroughParser
InlineParser for strikethrough text.
TableAstTransformer
AstTransformer that transforms escaped pipe cells in tables.
TableParagraphTransformer
ParagraphTransformer that transforms table paragraphs into table nodes.
TaskListItemParagraphTransformer
ParagraphTransformer that transforms list items into task list items.
ThematicBreakParser
BlockParser for thematic breaks.

Enums§

AnyAstTransformer
An enum of all AST transformers.
AnyBlockParser
An enum of all block parsers.
AnyInlineParser
An enum of all inline parsers.
AnyParagraphTransformer
An enum of all Paragraph transformers.

Constants§

NO_EXTENSIONS
An empty parser extension that does nothing.
PRIORITY_ATX_HEADING
Priority for ATX heading parser.
PRIORITY_AUTO_LINK
Priority for auto link parser.
PRIORITY_BLOCKQUOTE
Priority for blockquote parser.
PRIORITY_CODE_SPAN
Priority for code span parser.
PRIORITY_EMPHASIS
Priority for emphasis parser.
PRIORITY_FENCED_CODE_BLOCK
Priority for fenced code block parser.
PRIORITY_HTML_BLOCK
Priority for HTML block parser.
PRIORITY_INDENTED_CODE_BLOCK
Priority for indented code block parser.
PRIORITY_LINK
Priority for link parser.
PRIORITY_LIST
Priority for list parser.
PRIORITY_LIST_ITEM
Priority for list item parser.
PRIORITY_PARAGRAPH
Priority for paragraph parser.
PRIORITY_RAW_HTML
Priority for raw HTML parser.
PRIORITY_SETTEXT_HEADING
Priority for setext heading parser.
PRIORITY_THEMATIC_BREAK
Priority for thematic break parser.

Traits§

AstTransformer
A trait that transforms AST nodes.
BlockParser
A trait that parses a block level element like Paragraph, List, Blockquote etc.
GenerateNodeId
A trait for generating unique node IDs.
InlineParser
A trait that parses an inline level element like CodeSpan, Link etc.
ParagraphTransformer
A trait that transforms Paragraph nodes.
ParserConstructor
A trait for constructing parsers with varying arguments.
ParserExtension
A trait for extending the parser with custom behavior.
ParserOptions
A trait for parser options. Each parser can define its own options by implementing this trait.

Functions§

gfm
Returns a ParserExtension that adds GitHub Flavored Markdown (GFM)
gfm_linkify
Returns a ParserExtension that adds GitHub Flavored Markdown (GFM) linkify support.
gfm_strikethrough
Returns a ParserExtension that adds GitHub Flavored Markdown (GFM) strikethrough support.
gfm_table
Returns a ParserExtension that adds GitHub Flavored Markdown (GFM) table support.
gfm_task_list_item
Returns a ParserExtension that adds GitHub Flavored Markdown (GFM) task list item support.
parse_attributes
Parses attributes from the reader. If attributes are found, returns Some(Attributes). Otherwise, returns None and resets the reader position
parse_delimiter
Parse a delimiter run in the reader. If a delimiter run is found, it is added to the context’s delimiter list, and the reader is advanced past the delimiter run. Returns a NodeRef to the text node representing the delimiter run.
process_delimiters
Processes the delimiter list in the context. Processing will be stop when reaching the bottom.