Class TableData
Represents a Markdown table's source cells, column preferences, headers, and spans.
public sealed class TableData
- Inheritance
-
TableData
- Inherited Members
Remarks
Header and body cells contain Markdown inline source, including escapes needed to preserve literal text. These strings are not display text. Tables lowered from an AST retain inline source where possible, expand resolved links with their titles, and encode transformed literals to preserve display semantics. Cell paragraphs and soft breaks are separated by spaces; hard breaks use newline character entities. The resulting source can differ from the input while retaining its rendered content and styles.
Constructors
- TableData(string[], Alignment[], string[][])
Initializes a new TableData from parsed table rows.
Properties
- ColumnAlignments
Gets the alignment for each column, parsed from the separator row.
- ColumnCount
Gets the number of columns in the table.
- Columns
Gets the complete column descriptions. Legacy array edits are read on reassignment to a table.
- Headers
Gets the first header row's source projection, or an empty array for a headerless structured table.
- Rows
Gets the legacy source projection of all rows except the first explicit header row.
- TableRows
Gets every logical row, including all headers and cell spans.
Methods
- CreateGrid(IEnumerable<TableColumnData>, IEnumerable<TableRowData>)
Creates a grid table with explicit headers, spans, and Markdown block cells.
- TryParse(IReadOnlyList<string>)
Parses consecutive raw table lines into a TableData instance.