RootParser
Responsible of assembling all the block, inline, text and configuration parsers supported by a text markup language.
Attributes
- Graph
-
- Supertypes
-
trait DefaultRecursiveParserstrait RecursiveParserstrait RecursiveSpanParserstrait EscapedTextParsersclass Objecttrait Matchableclass AnyShow all
Members list
Type members
Inherited classlikes
Attributes
- Inherited from:
- DefaultRecursiveSpanParsers
- Supertypes
Value members
Concrete methods
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.
Attributes
Provides the syntax highlighter for the specified language if present.
Provides the syntax highlighter for the specified language if present.
Attributes
Provides a test for the start of each line in plain paragraphs that indicates whether the line might be the start of a block that is allowed to interrupt paragraphs.
Provides a test for the start of each line in plain paragraphs that indicates whether the line might be the start of a block that is allowed to interrupt paragraphs.
Usually this is only supposed to be used by implementations of a base paragraph parser for a markup language, not by custom extensions.
If the parser returned by this function succeeds the result is the block that interrupts the paragraph, if it fails normal paragraph parsing should resume.
Attributes
Inherited methods
Adds support for escape sequences to the specified text parser.
Adds support for escape sequences to the specified text parser.
Value parameters
- p
-
the parser to add support for escape sequences to
Attributes
- Returns
-
a parser for a text span that supports escape sequences
- Inherited from:
- DefaultEscapedTextParsers
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.
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.
Attributes
- Inherited from:
- DefaultEscapedTextParsers
Parses the input into a sequence of blocks based on the available block types of the host markup language.
Parses the input into a sequence of blocks based on the available block types of the host markup language.
This parser always parses to the end of the input, therefore it is usually applied to the result of a previous parser invocation.
Attributes
- Inherited from:
- DefaultRecursiveParsers
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.
Attributes
- Inherited from:
- DefaultRecursiveParsers
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 it is usually applied to the result of a previous parser invocation.
Attributes
- Inherited from:
- DefaultRecursiveSpanParsers
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 either used in block parsers, that need to process inline markup after the text for the block has been parsed from the input string or for inline parsers, that need to process inline markup for a span with a delimiter while supporting nested spans.
In the latter case the passed parser is usually of type DelimitedText
which is an optimized parser that parses text and recursive spans in one pass. For other kinds of parsers the resulting parser will be a two-pass parser.
The returned parser allows to register parsers for child spans with its embed
method for parsing types of child spans in addition to the available span types of the host markup language
Attributes
- Inherited from:
- DefaultRecursiveSpanParsers
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 either used in block parsers, that need to process inline markup after the text for the block has been parsed from the input string or for inline parsers, that need to process inline markup for a span with a delimiter while supporting nested spans.
In the latter case the passed parser is usually of type DelimitedText
which is an optimized parser that parses text and recursive spans in one pass. For other kinds of parsers the resulting parser will be a two-pass parser.
The returned parser allows to register parsers for child spans with its embed
method for parsing types of child spans in addition to the available span types of the host markup language
Attributes
- Inherited from:
- DefaultRecursiveSpanParsers
Concrete fields
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.
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.
Attributes
Parses a full document, delegating most of the work to the topLevelBlock
parser.
Parses a full document, delegating most of the work to the topLevelBlock
parser.
Attributes
Inherited fields
Attributes
- Inherited from:
- DefaultRecursiveSpanParsers
Parses an escape sequence (usually a backslash followed by a single char). The characters allowed in an escape sequence might differ between markup languages, therefore custom parser implementations should use this parser as it is always configured correctly for the current host language.
Parses an escape sequence (usually a backslash followed by a single char). The characters allowed in an escape sequence might differ between markup languages, therefore custom parser implementations should use this parser as it is always configured correctly for the current host language.
Attributes
- Inherited from:
- DefaultEscapedTextParsers
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.
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.
Attributes
- Inherited from:
- DefaultRecursiveParsers