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
table-short-captions: fix support for Pandod 2.10+
Commit 6e1b2cc (table-short-captions: add support for pandoc 2.10,
2020-07-15) doesn't work because it treats the new `Table.caption.long`
object as the pre 2.10 `Table.caption` object, but they are completely
different lists. `Table.caption.long` is a list of `Blocks`, where each
block has a `content` key which is a `List` of inlines (or it should be,
a test would be needed for more complex captions?). The pre 2.10
`Table.caption` is a `List` of inlines, so they cannot share the same
code to be manipulated.
Fix by just splitting into two different functions. They do follow the
same structure, but it is better to keep them separated, otherwise it
would require too many ifs, or code that is not clear.
For pre 2.10 `Table.caption` just keep the code as it is.
For the new `Table.caption.long`, ensure that the outer list of `Blocks`
is taken into account when searching for the inline `Span` with the
short caption.
Now all tests pass again.
0 commit comments