Skip to main content

Module table

Module table 

Source
Expand description

Editing a Markdown table as a table. Every change rewrites it with its columns lined up, so the source stays as readable as the page.

Enums§

Align
Edit
What can be done to a table, from the cell the caret is in.

Functions§

apply
Applies an edit to a table’s text, from the cell at (row, column), counting the header as row zero and leaving out the rule. Returns the new text, and the cell to land in. Deleting the table, or its only row or column, returns None for the text.
cell_offset
Where a cell’s text starts in printed table text, in chars.
edit_rows
Changes rows of data, and says where the caret goes, in chars. None leaves it as it was: data keeps at least one row and column, and has no alignment to change.
field_of
Which field a row of data is at, given the text before the caret.
new_table
A new, empty table with a header row.