Documentation
¶
Overview ¶
Package tablefmt answers "what does the canonical aligned form of a pipe-table look like for these source lines?" Callers ask the package to format a string of markdown, to spot non-conforming tables in a parsed line list, or to rewrite the source bytes in place.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatLines ¶
FormatLines rewrites every table found in source with canonical formatting, preserving everything else. lines must be the result of splitting source on newlines (i.e. f.Lines from internal/lint).
func FormatString ¶
FormatString formats all markdown tables in s with the given padding and returns the result. Padding less than 0 falls back to 1 (one space of padding on each side of cell content).
Types ¶
Click to show internal directories.
Click to hide internal directories.