6723891c72
If a table has explicit column width information *and* the content extends beyond the `--columns` width, we need to adjust the widths of the pipe separators to encode this width information. Closes #7847.
2.2 KiB
2.2 KiB
% pandoc -f html -t markdown_strict+pipe_tables
<table>
<colgroup>
<col style="width: 20%" />
<col style="width: 60%" />
<col style="width: 20%" />
</colgroup>
<thead>
<tr class="header">
<th>aaa</th>
<th>bbb</th>
<th>ccc</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Consequat nisi sit amet nibh. Nunc mi tortor, tristique
sit amet, rhoncus porta, malesuada elementum, nisi.</td>
<td></td>
<td>ccc</td>
</tr>
</tbody>
</table>
^D
| aaa | bbb | ccc |
|---------------|------------------------------------------|---------------|
| Consequat nisi sit amet nibh. Nunc mi tortor, tristique sit amet, rhoncus porta, malesuada elementum, nisi. | | ccc |
% pandoc -f html -t markdown_strict+pipe_tables
<table>
<tr>
<th>aaa</th>
<th>bbb</th>
<th>ccc</th>
</tr>
<tr>
<td>Consequat nisi sit amet nibh. Nunc mi tortor, tristique
sit amet, rhoncus porta, malesuada elementum, nisi.</td>
<td></td>
<td>ccc</td>
</tr>
</table>
^D
| aaa | bbb | ccc |
|-------------------------------------------------------------------------------------------------------------|-----|-----|
| Consequat nisi sit amet nibh. Nunc mi tortor, tristique sit amet, rhoncus porta, malesuada elementum, nisi. | | ccc |
% pandoc -f html -t commonmark+pipe_tables
<table>
<colgroup>
<col style="width: 20%" />
<col style="width: 60%" />
<col style="width: 20%" />
</colgroup>
<thead>
<tr class="header">
<th>aaa</th>
<th>bbb</th>
<th>ccc</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Consequat nisi sit amet nibh. Nunc mi tortor, tristique
sit amet, rhoncus porta, malesuada elementum, nisi.</td>
<td>bbb</td>
<td>ccc</td>
</tr>
</tbody>
</table>
^D
| aaa | bbb | ccc |
|-------------------------------------------------------------------------------------------------------------|-----|-----|
| Consequat nisi sit amet nibh. Nunc mi tortor, tristique sit amet, rhoncus porta, malesuada elementum, nisi. | bbb | ccc |