pandoc-crossref icon indicating copy to clipboard operation
pandoc-crossref copied to clipboard

Table references undefined after list items

Open malcolmsailor opened this issue 5 months ago • 3 comments

I have come across a bug where when a table in the simple_tables style is preceded by a list item, references to that table are undefined. For example, if I put the following in test.md and then run pandoc --filter pandoc-crossref test.md, I get an Undefined cross-reference: tbl:tbl1 error.

A reference to [@tbl:tbl1].

1. list item

            Column label
----------- --------------
Row label   1

: A table. {#tbl:tbl1}

On the other hand, both of the following run without issue:

  1. using the pipe_tables format:
A reference to [@tbl:tbl1].

1. list item

|           |Column label |
|-----------|--------------|
|Row label  | 1 |

: A table. {#tbl:tbl1}

  1. deleting the list item:
A reference to [@tbl:tbl1].

            Column label
----------- --------------
Row label   1

: A table. {#tbl:tbl1}

I am using pandoc 3.3 and pandoc-crossref v0.3.17.1 (both installed with homebrew on MacOS).

malcolmsailor avatar Aug 30 '24 14:08 malcolmsailor