Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rst writer with --list-tables=true: fix not aligned indentation of table elements #10227

Closed
PhilipPartsch opened this issue Sep 27, 2024 · 0 comments
Labels

Comments

@PhilipPartsch
Copy link

Explain the problem.
In reStructuredText (rst) specification the indentation of blocks are important.
Currently the generate elements in list-table rst directive are not indented by three spaces as the rest in our rst writer.
So rst parsers treat these parts as not aligned and so they are different blocks - instead as one.

Current output:
from

.. list-table::
   :widths: 36 36
   - 
      - HTTP header

         The HTTP header indicates that the HTTP method used is POST,
         ...

Expected output:

.. list-table::
   :widths: 36 36
   - 
      -  HTTP header

         The HTTP header indicates that the HTTP method used is POST,
         ...

As you can see the HTTP header is moved by one additional space.

Issue in the source code:
In rst writer we add only one space after - (- ). If we would write two spaces (- ), the parts of the documentation are aligned and are one rst block.

Alternative Solution:
We could even store, that here we do not have an indentation of three spaces, only two. So we indent the parts of this block only by two spaces.

Pandoc version?

3.4

jgm added a commit that referenced this issue Sep 27, 2024
- Fix alignment of list items corresponding to cells.
- Don't enclose the list table in a `.. table::`; this leads to
  doubled captions.

Closes #10226.
Closes #10227.
Modified test output for #4564.
@jgm jgm closed this as completed in 9a3aed9 Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant