You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a table contains an undefined cell then the Docx writer can generate a fatal "Encountered unassigned table cell" error (in which case no output is generated).
Such a table is invalid, and probably couldn't usually be created, but can be created due to a bug in a filter, e.g., the pandoc-ext/list-table filter can generate such tables (I've created pandoc-ext/list-table#2 to fix this).
However, I think that one can argue that writers should be able to handle such malformed input. The HTML writer can, but the Docx writer only seems to be able to handle it when the missing cell is in the first row.
With this markdown:
This has an unassigned table cell but doesn't trigger a docx writer error.
::: list-table
* - A
- B
* - 1
:::
But this does.
::: list-table
* - A
- B
* - 1
- 2
* - 3
:::
...the default HTML writer creates empty cells for any missing ones:
% pandoc-3.1.8 -L list-table.lua list-table-bug.md
<p>This has an unassigned table cell but doesn’t trigger a docx writer
error.</p>
<table>
<thead>
<tr class="header">
<th>A</th>
<th>B</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>1</td>
<td></td> <!-- added empty cell ->
</tr>
</tbody>
</table>
...
...but the Docx writer doesn't (in fact it seems to if the empty cell is in the first row, but not if it's in the second):
If a table contains an undefined cell then the Docx writer can generate a fatal "Encountered unassigned table cell" error (in which case no output is generated).
Such a table is invalid, and probably couldn't usually be created, but can be created due to a bug in a filter, e.g., the pandoc-ext/list-table filter can generate such tables (I've created pandoc-ext/list-table#2 to fix this).
However, I think that one can argue that writers should be able to handle such malformed input. The HTML writer can, but the Docx writer only seems to be able to handle it when the missing cell is in the first row.
With this markdown:
...the default HTML writer creates empty cells for any missing ones:
...but the Docx writer doesn't (in fact it seems to if the empty cell is in the first row, but not if it's in the second):
The text was updated successfully, but these errors were encountered: