astanin / python-tabulate

Pretty-print tabular data in Python, a library and a command-line utility. Repository migrated from bitbucket.org/astanin/python-tabulate.
https://pypi.org/project/tabulate/
MIT License
2.16k stars 165 forks source link

Renders GitHub-Flavored Markdown tables in canonical format #260

Closed kdeldycke closed 1 year ago

kdeldycke commented 1 year ago

In the GitHub Flavored Markdown Spec, tables are formatted in all sorts of shapes.

But one common aspect is that the pipes separating the cells are padded by a space. This is acknowledged in python-tabulate with the padding=1 settings. But unfortunately this setting doesn't applies to the lineabove and linebelowheader lines.

This PR fixes this issue, by having the line separators renders with padding spaces between the pipes and dashes.

kdeldycke commented 1 year ago

All tests are passing, this PR is ready to be merged upstream.

kdeldycke commented 1 year ago

This PR has been superseded by #261.