BlockParsers

Provides all block parsers for Markdown text except for for lists which are factored out into a separate parser object and those blocks dealing with verbatim HTML markup which this library treats as an optional feature that has to be explicitly mixed in.

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 decoratedBlock(firstLinePrefix: Parser[Any], linePrefix: Parser[Any], nextBlockPrefix: Parser[Any]): Parser[BlockSource]

Parses a single Markdown block. In contrast to the mdBlock parser this method also verifies that the second line is not a setext header decoration.

Parses a single Markdown block. In contrast to the mdBlock parser this method also verifies that the second line is not a setext header decoration.

Value parameters:
firstLinePrefix

parser that recognizes the start of the first line of this block

linePrefix

parser that recognizes the start of subsequent lines that still belong to the same block

nextBlockPrefix

parser that recognizes whether a line after one or more blank lines still belongs to the same block

def mdBlock(firstLinePrefix: Parser[Any], linePrefix: Parser[Any], nextBlockPrefix: Parser[Any]): Parser[BlockSource]

Parses a single Markdown block. In contrast to the generic block parser of the generic block parsers this method also consumes and ignores up to three optional space characters at the start of each line.

Parses a single Markdown block. In contrast to the generic block parser of the generic block parsers this method also consumes and ignores up to three optional space characters at the start of each line.

Value parameters:
firstLinePrefix

parser that recognizes the start of the first line of this block

linePrefix

parser that recognizes the start of subsequent lines that still belong to the same block

nextBlockPrefix

parser that recognizes whether a line after one or more blank lines still belongs to the same block

Concrete fields

Parses an ATX header, a line that starts with 1 to 6 '#' characters, with the number of hash characters corresponding to the level of the header. Markdown also allows to decorate the line with trailing '#' characters which this parser will remove.

Parses an ATX header, a line that starts with 1 to 6 '#' characters, with the number of hash characters corresponding to the level of the header. Markdown also allows to decorate the line with trailing '#' characters which this parser will remove.

Parses just a plain paragraph after the maximum nest level has been reached. This is necessary as a separate parser as the default markdown paragraph parser is combined with potentially nested lists which makes that parser recursive.

Parses just a plain paragraph after the maximum nest level has been reached. This is necessary as a separate parser as the default markdown paragraph parser is combined with potentially nested lists which makes that parser recursive.

Parses up to 3 space characters. In Markdown an indentation of up to 3 spaces is optional and does not have any influence on the parsing logic.

Parses up to 3 space characters. In Markdown an indentation of up to 3 spaces is optional and does not have any influence on the parsing logic.

Parses a link definition in the form [id]: <url> "title". The title is optional as well as the quotes around it and the angle brackets around the url.

Parses a link definition in the form [id]: <url> "title". The title is optional as well as the quotes around it and the angle brackets around the url.

Parses a literal block, text indented by a tab or 4 spaces.

Parses a literal block, text indented by a tab or 4 spaces.

Parses either a setext header, or a plain paragraph if the second line of the block is not a setext header decoration. Only used for nested blocks where lists starting in the middle of a paragraph are allowed.

Parses either a setext header, or a plain paragraph if the second line of the block is not a setext header decoration. Only used for nested blocks where lists starting in the middle of a paragraph are allowed.

Parses a quoted block, a paragraph starting with a '>' character, with subsequent lines optionally starting with a '>', too.

Parses a quoted block, a paragraph starting with a '>' character, with subsequent lines optionally starting with a '>', too.

Parses either a setext header, or a plain paragraph if the second line of the block is not a setext header decoration. Only used for root level blocks where lists starting in the middle of a paragraph are not allowed.

Parses either a setext header, or a plain paragraph if the second line of the block is not a setext header decoration. Only used for root level blocks where lists starting in the middle of a paragraph are not allowed.

Parses a horizontal rule, a line only decorated with three or more '*', '-' or '_' characters with optional spaces between them

Parses a horizontal rule, a line only decorated with three or more '*', '-' or '_' characters with optional spaces between them

Parses the decoration (underline) of a setext header.

Parses the decoration (underline) of a setext header.

val tabOrSpace: Parser[Unit]

Parses a single tab or space character.

Parses a single tab or space character.