Builds a parser for a list of blocks based on the parser for a single block.
Builds a parser for a list of blocks based on the parser for a single block.
Parses blocks, excluding blocks that allow nesting.
Parses blocks, excluding blocks that allow nesting. Only used in rare cases when the maximum nest level allowed had been reached
Parses any kind of nested block supported by a concrete markup language.
Parses any kind of nested block supported by a concrete markup language.
Parses any kind of top-level block supported by a concrete markup language.
Parses any kind of top-level block supported by a concrete markup language.
The mapping of markup start characters to their corresponding span parsers.
The mapping of markup start characters to their corresponding span parsers.
A parser mapped to a start character is not required to successfully parse the subsequent input. If it fails the character that triggered the parser invocation will be treated as normal text. The mapping is merely used as a performance optimization. The parser will be invoked with the input offset pointing to the character after the one specified as the key for the mapping.
Lifts the specified text parser to parse the string result as a sequence of spans.
Lifts the specified text parser to parse the string result as a sequence of spans.
This type of span parser is usually used in inline parsers, that need to process inline markup for a span with a delimiter while supporting nested spans.
Lifts the specified text parser to parse the string result as a sequence of spans.
Lifts the specified text parser to parse the string result as a sequence of spans. Adds the specified additional parsers to the span parsers of the host markup language.
This type of span parser is usually used in inline parsers, that need to process inline markup for a span with a delimiter while supporting nested spans.
Parses a single escape character.
Parses a single escape character. In the default implementation any character can be escaped. Sub-traits may override this parser to restrict the number of escapable characters.
Adds support for escape sequences to the specified text parser.
Adds support for escape sequences to the specified text parser.
the parser to add support for escape sequences to
a parser for a text span that supports escape sequences
Parses a span of text until one of the specified characters is seen (unless it is escaped), while also processing escaped characters, but no other nested spans.
Parses a span of text until one of the specified characters is seen (unless it is escaped), while also processing escaped characters, but no other nested spans. The final character is not included in the result.
the character(s) that signals the end of the text span
a parser for a text span that supports escape sequences
The maximum level of block nesting.
The maximum level of block nesting. Some block types like lists and blockquotes contain nested blocks. To protect against malicious input or accidentally broken markup, the level of nesting is restricted.
Lifts the specified text parser to parse the string result as a sequence of blocks.
Lifts the specified text parser to parse the string result as a sequence of blocks.
This type of span parser is usually used in block parsers, that support the nesting of other blocks.
Parses the input into a sequence of spans based on the available span types of the host markup language.
Parses the input into a sequence of spans based on the available span types of the host markup language.
This parser always parses to the end of the input, therefore is usually applied to the string result of a previous parser invocation.
Lifts the specified text parser to parse the string result as a sequence of spans.
Lifts the specified text parser to parse the string result as a sequence of spans. Adds the specified additional parsers to the span parsers of the host markup language.
This type of span parser is usually used in block parsers, that need to process inline markup after the text for the block has been parsed from the input string.
Lifts the specified text parser to parse the string result as a sequence of spans.
Lifts the specified text parser to parse the string result as a sequence of spans.
This type of span parser is usually used in block parsers, that need to process inline markup after the text for the block has been parsed from the input string.
Adds a block parser function to the result of the specified parser.
Adds a block parser function to the result of the specified parser. The function can be used for any kind of custom block parsing of portions of the result produced by the base parser.
The parser function never fails, but instead inserts blocks of type InvalidBlock
into the result in case of errors.
Adds a span parser function to the result of the specified parser.
Adds a span parser function to the result of the specified parser. The function can be used for any kind of custom span parsing of portions of the result produced by the base parser.
The parser function never fails, but instead inserts spans of type InvalidSpan
into the result in case of errors.
Default implementation for parsing inline markup and blocks recursively.