-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Good day team,
When writing grid tables in Markdown, and using pandoc to convert the tables to HTML, Pandoc works flawlessly, thanks to #8257. My problem is when the conversion is from Markdown to Markdown: in this case, the footer gets completely removed.
Here goes a screenshot using https://pandoc.org/try/
As can be seen, the input Markdown table contains a footer, but the output Markdown table has no footer anymore.
The reason why this is relevant to me is because of my workflow. I work like this:
Source Markdown -> Markdown with TOC, Citations -> HTML with TOC, Citations.
So my workflow involves an intermediate Markdown step, to include the TOC, Citations, etc. Without it, I would need to manually write the TOC, or manually re-add the table footers that were lost in the Markdown to Markdown conversion.
Steps to replicate
- Execute the following:
pandoc -f markdown -t markdown
+------+-------+
| Item | Price |
+======+=======+
| Eggs | 5£ |
+------+-------+
| Spam | 3£ |
+======+=======+
| Sum | 8£ |
+======+=======+
^D
Observed behavior
This is the output received from that command:
--------------
Item Price
------ -------
Eggs 5£
Spam 3£
Sum 8£
--------------
The table footer is missing in the output.
Expected behavior
In this moment one could ask, how should the output be formatted? I'm no expert in Markdown to Markdown conversions, but it seems to me that the outputted table is the simplest it can be, e.g. a grid table is converted down to a simple table. As far as I know, simple tables don't have footers, so in that case, the conversion would need to keep the grid table with the footer.
Pandoc version?
This was tested on Pandoc's latest release as of this writing, on a MacOS Tahoe 26.2, and on https://pandoc.org/try/:
pandoc 3.8.3
Features: +server +lua
Scripting engine: Lua 5.4