mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-03 06:05:45 +00:00
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.
83 lines
1.1 KiB
Markdown
83 lines
1.1 KiB
Markdown
```
|
|
% 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 | |
|
|
+---+---+
|
|
| | |
|
|
+---+---+
|
|
```
|
|
|