Skip to content

rst writer with --list-tables=true: table with caption as input is getting two captions in the rst output #10226

@PhilipPartsch

Description

@PhilipPartsch

Explain the problem.
If a table has a caption in the input, the rst writer with --list-tables=true generates a unecassary additional table, which leads to two captions.

current output:

.. table:: Table 1 — Terminology

   .. list-table:: Table 1 — Terminology

expected output:

.. list-table:: Table 1 — Terminology

Issue in the source code:
The current rst writer is adding always an additional table rst directive if a table caption is been set.
In case we create a list-table we should not do this, as the list-table directive gives the opportunity to set a caption by itself.
See

Pandoc version?
3.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions