Open xfbs opened 3 years ago
I took the liberty of formatting your json to make it easier to read.
So I believe the issue is that the format changed and I should have updated pandoc-ast
to handle the pandoc-api-version
change to use structs instead of tuples (TableFoot
, TableBody
, TableHead
and Caption
at least should now be struct
s that eat up the "t": "TableFoot"
and similar. I don't have the time and setup to work on this right now, so any implementation work would be appreciated.
Thanks for looking into it, I already figured that it might be due to some change in the serialisation. I'll take a look at the code tomorrow and see if I can implement anything useful, should probably be able to get it fixed and tested tomorrow, I'll send a pull request your way if I make any useful progress.
Just noting that, afaict, this crashes result from any tables at all, whether or not they have captions. At least against pandoc 2.9.2.1 (using pandoc_ast 0.8.0
).
Here's failing table:
| A | B | C |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 2 | 2 |
Which (when using filter
) panics with:
thread 'main' panicked at 'json is not in the pandoc format: Error("invalid length 0, expected a tuple of size 3", line: 1350, column: 5)
I don't mean to add to your workload, but I think it could be helpful for users to add a warning to the readme noting that support for the pandoc api is not actively maintained, and indicating the current maximum pandoc version supported.
Hey,
really awesome work here! I noticed a crash when parsing the AST of this table tho:
Here is the raw JSON:
I hope that is enough information to reproduce this issue. I'm using pandoc version 2.10.1, pandoc crate 0.8.2 and pandoc-ast 0.8.0.