BlockParsers

Provides the parsers for all types of block-level elements of reStructuredText. It merges the individual traits that provide implementations for list, tables, etc. and adds the remaining block level parsers that do not fit into any of the subcategories supported by the other traits.

Block parsers are only concerned with splitting the document into (potentially nested) blocks. They are used in the first phase of parsing, while delegating to inline parsers for the 2nd phase.

class Object
trait Matchable
class Any

Value members

Concrete methods

def createBlockListParser(blockParser: Parser[Block]): Parser[Seq[Block]]

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.

Adds the processing required for cases where a block has influence on the parsing or processing of the subsequent block.

This includes checking each Paragraph for a double colon ending which turns the following block into a literal block as well as processing internal link targets and section headers.

Value parameters:
blockParser

the parser for a single block element

Returns:

a parser for a list of blocks

Concrete fields

Parses a block quote with an optional attribution.

Parses a block quote with an optional attribution.

See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#block-quotes

Parses a doctest block. This is a feature which is very specific to the world of Python where reStructuredText originates. Therefore the resulting DoctestBlock tree element is not part of the standard Laika AST model. When this block type is used the corresponding special renderers must be enabled (e.g. the ExtendedHTMLRenderer renderer for HTML).

Parses a doctest block. This is a feature which is very specific to the world of Python where reStructuredText originates. Therefore the resulting DoctestBlock tree element is not part of the standard Laika AST model. When this block type is used the corresponding special renderers must be enabled (e.g. the ExtendedHTMLRenderer renderer for HTML).

See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#doctest-blocks

Parses a section header with both overline and underline.

Parses a section header with both overline and underline.

See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#sections.

Parses a section header with an underline, but no overline.

Parses a section header with an underline, but no overline.

See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#sections.

Parses a literal block, either quoted or indented. Only used when the preceding block ends with a double colon (::).

Parses a literal block, either quoted or indented. Only used when the preceding block ends with a double colon (::).

See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#literal-blocks

Parses a single paragraph. Everything between two blank lines that is not recognized as a special reStructuredText block type will be parsed as a regular paragraph.

Parses a single paragraph. Everything between two blank lines that is not recognized as a special reStructuredText block type will be parsed as a regular paragraph.

val ws: Characters[String]