Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrent simple table parsing for RST->Markdown #10093

Closed
levitvas opened this issue Aug 16, 2024 · 1 comment
Closed

Incorrent simple table parsing for RST->Markdown #10093

levitvas opened this issue Aug 16, 2024 · 1 comment

Comments

@levitvas
Copy link

Failes to correctly transform and parse tables with empty columns when converting from RST to Markdown.
Here is a test table made in RST:

.. table:: Test Table

   ================================== ==== =========== =============== ===== === =====
   Functions for tests                1    2Test       3Untested       4Alg  5   6Col
   ================================== ==== =========== =============== ===== === =====
   a                                  yes              yes
   b                                       yes
   c                                                                         yes yes
   d                                  yes
   e                                                   yes             yes
   ================================== ==== =========== =============== ===== === =====

Base command used for running:
pandoc in.rst -f rst -t markdown+simple_tables+grid_tables -o out.md
Running this results in a grid table that is incorrect:
If ran with +simple_tables+grid_tables

+---------------------+-----+-------+-----------+------+-----+------+
| Functions for tests | 1   | 2Test | 3Untested | 4Alg | 5   | 6Col |
+=====================+=====+=======+===========+======+=====+======+
| a b c d e           | yes | yes   | yes       | yes  | yes | yes  |
|                     |     |       |           |      |     |      |
|                     | yes |       | yes       |      |     |      |
+---------------------+-----+-------+-----------+------+-----+------+

If ran with +simple_tables-grid_tables results in a regular table, but also incorrect:

<table>
<caption>Test Table</caption>
<thead>
<tr>
<th>Functions for tests</th>
<th>1</th>
<th>2Test</th>
<th>3Untested</th>
<th>4Alg</th>
<th>5</th>
<th>6Col</th>
</tr>
</thead>
<tbody>
<tr>
<td><p>a b c d e</p></td>
<td><p>yes</p>
<p>yes</p></td>
<td><p>yes</p></td>
<td><p>yes</p>
<p>yes</p></td>
<td><p>yes</p></td>
<td><p>yes</p></td>
<td><p>yes</p></td>
</tr>
</tbody>
</table>

How the table looks like in Markdown:

Test Table
Functions for tests 1 2Test 3Untested 4Alg 5 6Col

a b c d e

yes

yes

yes

yes

yes

yes

yes

yes

How it looks like in RST:
image

Pandoc version
Tested on latest version 3.3 on Windows.

@jgm
Copy link
Owner

jgm commented Aug 29, 2024

Smaller test case:

========== ====
Function   1   
========== ====
a          yes 
b              
========== ====

It does depend on the empty cell; if that is filled then we get two rows.

@jgm jgm closed this as completed in a0bc3a5 Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants