Package-level declarations

Types

Link copied to clipboard

Recognizes a block quote.

Link copied to clipboard

Recognizes any non-blank line no other recognizer claimed. As the last recognizer of every block lexer, it guarantees the scan always makes progress.

Link copied to clipboard

Recognizes a comment, at a line start or in the middle of a line the scan resumed inside. A comment may span lines and absorbs nothing after its closing delimiter, so its text is not line-aligned and its match carries an explicit end index.

Link copied to clipboard

Recognizes content fenced by three or more backticks or tildes. The block ends at the first line that holds nothing but a run of the same character, at least as long as the opening one, and trailing whitespace. A longer opening fence therefore wraps shorter fences as content, and a block whose fence is never closed runs to the end of the document.

Link copied to clipboard

Recognizes a footnote definition. Its text follows the paragraph continuation rule, so the definition ends where a paragraph does.

Link copied to clipboard

Recognizes a heading opened by one to six #. The trailing # run and the whitespace before it are dropped, and the heading absorbs every blank line that follows it.

Link copied to clipboard

Recognizes content indented by at least four columns.

Link copied to clipboard

Recognizes a referenceable link definition. The URL may start on the line after the colon and the title on the line after the URL, so a definition spans up to three lines. The block absorbs the empty lines that follow it.

Link copied to clipboard

Recognizes one item of a list. Like the list itself, it keeps an explicit loop, because its stopping rule chooses between ending before the terminator, ending after it, and continuing.

Link copied to clipboard

The two kinds of list, which differ in the bullets that may open and continue them.

Link copied to clipboard
class ListRecognizer(interruption: Interruption, kind: ListKind) : BlockRecognizer

Recognizes a list, ordered or not.

Link copied to clipboard

Recognizes a run of blank lines. The token's text spans every blank line with its terminator, so consecutive blank lines collapse into a single token.

Link copied to clipboard

Recognizes plain text content: a non-empty line, continued by every following line that is neither empty nor an interruption.

Link copied to clipboard

Recognizes a heading underlined by = or -. Every line from the first up to the underline is the heading's content; none of them may start with a bullet or be an underline itself.

Link copied to clipboard

Recognizes a GFM table. The rows run from the third line up to the first blank line or interruption, and the trailing empty lines belong to the token. A caption or custom ID in the last row is the parser's business.

Link copied to clipboard

Recognizes a thematic break. It absorbs the empty lines that follow it, but not a whitespace-only line, which ends it.

Functions

Link copied to clipboard

The block recognizers of the base Markdown flavor, highest priority first.