mirror of
https://github.com/jgm/pandoc.git
synced 2026-07-11 20:07:22 +00:00
78efe58641
Fix headings with colspans. If the heading contains a colspan, we still need to include information in the header line about the colspecs. Fix headerless tables. The top line should encode colspan information. Closes #10855.
1.1 KiB
1.1 KiB
% pandoc -f html -t markdown
<table>
<tr>
<td colspan="3">A</td>
<td rowspan="1" colspan="2">F</td>
</tr>
<tr>
<td>C</td>
<td colspan="2">B</td>
<td colspan="2">H</td>
</tr>
<tr>
<td colspan="2">D</td>
<td colspan="2">E</td>
<td>G</td>
</tr>
</table>
^D
+---+---+---+---+---+
| A | F |
+---+-------+-------+
| C | B | H |
+---+---+---+---+---+
| D | E | G |
+-------+-------+---+
% pandoc -f html -t markdown
<table>
<tr>
<td colspan="2">A</td>
<td colspan="2">J</td>
<td rowspan="3">F</td>
</tr>
<tr>
<td rowspan="3">C</td>
<td>B</td>
<td rowspan="2" colspan="2">H</td>
</tr>
<tr>
<td>D</td>
</tr>
<tr>
<td colspan="4">K</td>
</tr>
</table>
^D
+---+---+-------+---+
| A | J | F |
+---+---+-------+ |
| C | B | H | |
| +---+ | |
| | D | | |
| +---+-------+---+
| | K |
+---+---------------+
% pandoc -f html -t markdown-simple_tables-multiline_tables-pipe_tables
<table>
<tbody>
<tr>
<td>a</td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</tbody>
</table>
^D
+---+---+
| a | |
+---+---+
| | |
+---+---+