Skip to main content

markdown_table

Function markdown_table 

Source
pub(crate) fn markdown_table(headers: &[&str], rows: &[Vec<String>]) -> String
Expand description

Render a markdown table with padded cells, the first column left-aligned and the rest right.

Markdown does not need the padding, but a generated file is read as often in a terminal as in a renderer, and an unpadded table with a column as wide and as variable as a model name is hard to scan in either. Right-aligning the numbers lines up their digits.