Docs
Back to API Reference
Class

MarkdownTableParseRule

sealed
Inherits:RangeSourceParseRule

A parse rule reading GitHub Flavored Markdown pipe tables for TableModifier.

Remarks

A table is a header line, the delimiter row under it with as many cells, each a run of dashes with an optional colon at either end, and the rows after it up to a blank line, the end of the text or a line starting another block: an ATX heading, a block quote, a code fence, a thematic break, a list item or a line indented four columns. A colon on the left aligns the column to the start, on the right to the end, on both sides to the center; a column without colons aligns to the start. Leading and trailing pipes are optional and \| is a pipe inside a cell, within code spans and after another backslash too, as on github.com. Spaces after a cell's text stay in its paragraph and hang at the line end. A shorter row leaves its last cells empty, cells past the header's count are dropped, and a line of dashes alone, without a pipe or a colon, is a heading underline that starts no table. Every cell becomes a paragraph of the text, so other rules keep parsing cell content: bold, code spans and links inside cells work as anywhere else, though a marker left open in one cell pairs with a marker in a later cell. A horizontal line separates the header row from the body. HTML blocks do not end a table, since tags in the text are inline markup.
public string MarkupTriggers{ get }
public string ScanTriggers{ get }
public string TypingTriggers{ get }
public override void Reset()
public override int TryMatch(ReadOnlySpan<char> text, int index, PooledList<ParsedRange> results)

See Also