pandocfilters icon indicating copy to clipboard operation
pandocfilters copied to clipboard

Table definition outdated

Open mtunix opened this issue 3 years ago • 2 comments
trafficstars

Hello,

it appears the elt definition of the Table object is outdated. In pandocfilters.py it is defined as:

[...]
Table = elt('Table', 5)
[...]

However if one tries to alter a table using this Table definition we run into a problem:

Error in $.blocks[28]: When parsing the constructor Table of type Text.Pandoc.Definition.Block expected Array of length 6 but got Array of length 5.

This is due to the fact that (apparently) the definition should actually contain 6 values. The TableFooter value is missing. It is however not possible to create a table in the correct dimensions using the current definition in pandocfilters.py.

I propose changing the Table definition to the following:

[...]
Table = elt('Table', 6)
[...]

This way it is possible to alter a table using the pandocfilters.py package again.

mtunix avatar Jun 03 '22 08:06 mtunix

I’ll take a look at it later, but I recently got COVID so it may take a while.

ickc avatar Jun 03 '22 21:06 ickc

@ickc are you still planning to work on this? There's a query on pandoc-discuss that asks whether this library is still being maintained. It would be great if it could be made compatible with the current pandoc AST, if not by you than by someone else.

jgm avatar Oct 25 '23 15:10 jgm