table
A GitHub-flavored Markdown table.
headers gives the columns; each row is padded with empty cells or cut to that many. Cells
are cleaned so they cannot break the table: | becomes \| and line breaks become spaces.
Columns are padded to a common width (at least 3, for the --- separator) so the source
lines up, measured in characters. The result has one line per row and ends with a newline;
no headers give an empty string. Cell text is not otherwise escaped: use
escape on text you do not control.
Import
Section titled “Import”Cargo feature markdown (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
headers | &[H] | The column titles. |
rows | &[Vec<C>] | The rows, each a list of cells. |
Returns
Section titled “Returns”String — The table.
