Module parse

Source

Structsยง

Context ๐Ÿ”’
Parsing context

Enumsยง

BreakRule ๐Ÿ”’
Whether two types should or shouldnโ€™t have a paragraph break between them
ParseOpt ๐Ÿ”’
Flags to simple parser function
Prev ๐Ÿ”’
Character class preceding this one

Constantsยง

ANC_E ๐Ÿ”’
Short aliases that we can use in match patterns. If an end pattern is not included, this type may be variable
ANC_S ๐Ÿ”’
BRK ๐Ÿ”’
CBK ๐Ÿ”’
CIL ๐Ÿ”’
CMT_E ๐Ÿ”’
CMT_S ๐Ÿ”’
EMP_A ๐Ÿ”’
EMP_U ๐Ÿ”’
HDG ๐Ÿ”’
LNK_CHARS ๐Ÿ”’
LNK_E ๐Ÿ”’
LNK_S ๐Ÿ”’
REPLACEMENTS ๐Ÿ”’
Pattern replacements
STG_A ๐Ÿ”’
STG_U ๐Ÿ”’
STK ๐Ÿ”’

Functionsยง

entrypoint ๐Ÿ”’
Parse a buffer
expand_plaintext ๐Ÿ”’
Perform transformations to text. This splits paragraphs, replaces patterns, and corrects newlines.
get_indented_section ๐Ÿ”’
is_break_ty ๐Ÿ”’
Types that indicate some form of break
match_reflink ๐Ÿ”’
Turn reflinks (links with reference IDs) into normal standalone links using listed link definitions
normalize ๐Ÿ”’
Take a parsed stream and fix the little things
ord_list_start ๐Ÿ”’
Verify a valid ordered list start (e.g. 1.) and parse it. Returns the parsed number and offset of character after the dot.
parse_any_link ๐Ÿ”’
Parse links. can_be_def indicates that a link definition is possible (top level, located at the start of a line)
parse_codeblock ๐Ÿ”’
Parse a codeblock. Accounts for >3 backticks and language specification
parse_codeinline ๐Ÿ”’
Parse backtick-wrapped inline code. Accounts for >1 backtick sets
parse_heading ๐Ÿ”’
parse_ordered_li ๐Ÿ”’
Numbered list
parse_recursive ๐Ÿ”’
Parse a buffer with specified context
parse_simple_pat ๐Ÿ”’
The simplest kind of patterns: data within start and end patterns
parse_to_newline ๐Ÿ”’
Return (match, residual) to end of line. The EOL is returned with the residual.
parse_unordered_li ๐Ÿ”’
Bulleted list
parse_with_end_pat ๐Ÿ”’
Find and consume an end pattern, return (match, residual)
should_break ๐Ÿ”’
Blocks that automatically handle their own text wrapping
trim_ascii_start ๐Ÿ”’
If there is more than one whitespace char at start, trim the extras
trim_extra_ws ๐Ÿ”’
If there is more than one whitespace char at start or end, trim the extras
unordered_list_start ๐Ÿ”’

Type Aliasesยง

ParseResult ๐Ÿ”’
Output of a parse function
Parsed ๐Ÿ”’
(extracted, remaining)