| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
There is a extra empty line in the colon_grid doctests (tabulate/__init__.py:1865 and 1877). Also the second doctest fails even when these empty lines are removed (there is no ':' in the first column). _______________________________ [doctest] tabulate.tabulate _______________________________
1864 ... ["strings", "numbers"], "colon_grid"))
1865 +-----------+-----------+
1866 | strings | numbers |
1867 +:==========+:==========+
1868 | spam | 41.9999 |
1869 +-----------+-----------+
1870 | eggs | 451 |
1871 +-----------+-----------+
1872
1873 >>> print(tabulate([["spam", 41.9999], ["eggs", "451.0"]],
Differences (unified diff with -expected +actual):
@@ -1,5 +1,5 @@
+-----------+-----------+
| strings | numbers |
-+==========:+:==========+
++===========+:==========+
| spam | 41.9999 |
+-----------+-----------+
...\python-tabulate\tabulate\__init__.py:1873: DocTestFailure
|
Sorry, something went wrong.
|
Thanks for pointing out the failing doctests, that's something I should have checked! Should be working now. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
To close #332, this PR adds a new table format "colon_grid" which is the same as the "grid" format but adds colons to the line below the header to indicate a column's alignment. This requires forcing left alignment on the data in the text output of tabulate.
With this format, tabulate can create Pandoc-compatible tables with alignments.
Existing grid format:
Grid format using existing alignment functionality:
Broken Pandoc rendering:
New colon_grid format:
Pandoc rendering of a colon_grid: