Add new Pandoc grid table format
The current "grid" table format in Tabulate's documentation says:
It corresponds to grid_tables in Pandoc Markdown extensions
It is true that the tables are similar to each other, but there is a nasty interaction between the padding that Tabulate provides and how Pandoc interprets grid tables. Specifically, the documentation for Pandoc's grid_tables states:
The cells of grid tables may contain arbitrary block elements (multiple paragraphs, code blocks, lists, etc.).
So each cell in the grid table is treated as essentially a new Markdown scope. In the Markdown spec, Markdown indented by 4 spaces is treated as a verbatim code block. For a column of integers, Tabulate will default to right-aligning the content in the cells, which Pandoc then interprets as a verbatim code block instead of standard text. For example:
+------------+------------+------------+
| Column 1 | Column 2 | Column 3 |
+============+============+============+
| 1 | a | 1.23 |
+------------+------------+------------+
| 2 | b | 12.3 |
+------------+------------+------------+
| 3 | c | 123 |
+------------+------------+------------+
is rendered as:
Forcing Tabulate to left-align the cells does allow it to render properly:
+------------+------------+------------+
| Column 1 | Column 2 | Column 3 |
+============+============+============+
| 1 | a | 1.23 |
+------------+------------+------------+
| 2 | b | 12.3 |
+------------+------------+------------+
| 3 | c | 123 |
+------------+------------+------------+
But Pandoc does support syntax for right-aligning cell content (using a colon, similar to pipe tables):
+------------+------------+------------+
| Column 1 | Column 2 | Column 3 |
+===========:+============+===========:+
| 1 | a | 1.23 |
+------------+------------+------------+
| 2 | b | 12.3 |
+------------+------------+------------+
| 3 | c | 123 |
+------------+------------+------------+
I think Tabulate should provide a new output format, pandoc_grid or grid_tables or something that produces a table similar to existing grid tables, but with cell content always left-aligned and inserting appropriate :s in the row below the header to select the alignment that Pandoc will use.