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

pandoc 2.0.6-2.1.3 (incorrectly?) requires rst list-table body to be indented 3 spaces or more #4579

Closed
phlummox opened this issue Apr 22, 2018 · 0 comments

Comments

@phlummox
Copy link

pandoc versions tried:

  • pandoc 2.0.6, compiled with pandoc-types 1.17.3, texmath 0.10.1, skylighting 0.5.0.1
  • pandoc 2.1.3, compiled with pandoc-types 1.17.4.2, texmath 0.10.1.1, skylighting 0.7.0.2

example (a.txt, list-table body indented 2 spaces):

.. list-table::
  :header-rows: 1
  
  * - Foo
    - Bar
  * - spam
    - ham

command run:

  • pandoc -f rst -t html -o a.html a.txt

expected output:

<table>
<thead>
<tr class="header">
<th>Foo</th>
<th>Bar</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>spam</td>
<td>ham</td>
</tr>
</tbody>
</table>

actual output (the body of the directive is interpreted as a block quote containing a definition list an a list):

<table>
<tbody>
</tbody>
</table>
<blockquote>
<dl>
<dt>header-rows</dt>
<dd><p>1</p>
</dd>
</dl>
<ul>
<li><ul>
<li>Foo</li>
<li>Bar</li>
</ul></li>
<li><ul>
<li>spam</li>
<li>ham</li>
</ul></li>
</ul>
</blockquote>

The rst file above has the body of the directive indented 2 spaces, and pandoc fails to parse it as a list-table. The rst specification says that the body of explicit markup blocks like this must be "indented relative to the first [line]", which it is, and rst2html parses it as a list-table. If the directive is indended 3 spaces or more, pandoc seems to parse the body correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants