TokenType

sealed interface TokenType

The semantic type of a highlighted span in a CommonMark document.

Token types cover both block-level markers and inline constructs. A syntax highlighter maps each type to a colour or style; a semantic analyser can use the types for structure-aware tooling.

Inheritors

Types

Link copied to clipboard
data object AutolinkUrl : TokenType

A URI or email address inside an autolink (<…>).

Link copied to clipboard

The > marker of a block quote.

Link copied to clipboard
data object CodeContent : TokenType

The content lines of a fenced or indented code block.

Link copied to clipboard
data object CodeFence : TokenType

The opening or closing fence of a fenced code block (` ``` ` or ~~~). */

Link copied to clipboard
data object CodeInfo : TokenType

The info string following a fenced code block opening fence.

Link copied to clipboard

The content of an inline code span.

Link copied to clipboard

The backtick run(s) delimiting an inline code span.

Link copied to clipboard

A delimiter run opening or closing emphasis (* or _).

Link copied to clipboard
data object EntityRef : TokenType

An HTML character entity reference (&amp;, &#42;, &#x2A;).

Link copied to clipboard

A backslash escape sequence (\!, \*, etc.).

Link copied to clipboard

A bare URL or email address (extended autolink, no angle brackets).

Link copied to clipboard
data object HardBreak : TokenType

A hard line break (two trailing spaces or \ before a newline).

Link copied to clipboard
data object HeadingMarker : TokenType

The # characters of an ATX heading, or the =/- underline of a Setext heading.

Link copied to clipboard
data object HeadingText : TokenType

The text content of a heading.

Link copied to clipboard
data object HtmlBlock : TokenType

A raw HTML block.

Link copied to clipboard
data object HtmlInline : TokenType

An inline raw HTML tag.

Link copied to clipboard
data object ImageMarker : TokenType

The ! prefix of an image.

Link copied to clipboard
data object LinkBracket : TokenType

The [ or ] bracket of an inline link or image.

Link copied to clipboard

A link or image destination URL.

Link copied to clipboard
data object LinkLabel : TokenType

The [label] part of a link reference definition.

Link copied to clipboard
data object LinkParen : TokenType

The ( or ) parenthesis of an inline link.

Link copied to clipboard
data object LinkTitle : TokenType

A link or image title ("…", '…', or (…)).

Link copied to clipboard
data object ListMarker : TokenType

The bullet (-, +, *) or ordered (1., 2)) list item marker.

Link copied to clipboard
data object SoftBreak : TokenType

A soft line break (a plain newline inside a paragraph).

Link copied to clipboard

The ~~ delimiter runs opening or closing a strikethrough span.

Link copied to clipboard
data object StrongMarker : TokenType

A delimiter run opening or closing strong emphasis (** or __).

Link copied to clipboard
data object TableCell : TokenType

Content of a body cell in a GFM table.

Link copied to clipboard

Pipe characters (|) and delimiter-row content (---, :---:, etc.).

Link copied to clipboard

Content of a header cell in a GFM table.

Link copied to clipboard
data object TaskMarker : TokenType

The [ ] or [x] checkbox marker in a task list item.

Link copied to clipboard
data object Text : TokenType

A run of unstyled plain text.

Link copied to clipboard
data object ThematicBreak : TokenType

The marker characters of a thematic break (---, ***, ___).