Structsยง
- Context ๐Parsing context
Enumsยง
- Break
Rule ๐Whether two types should or shouldnโt have a paragraph break between them - Parse
Opt ๐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 Resturn(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ยง
- Parse
Result ๐Output of a parse function - Parsed ๐
(extracted, remaining)