redbug312 / markdown-it-multimd-table

Multimarkdown table syntax plugin for markdown-it markdown parser
MIT License
146 stars 37 forks source link

[BUG]: colspan on wrong table cell #39

Closed JiangWeixian closed 3 years ago

JiangWeixian commented 3 years ago

version: 4.1.0

input

|  |  |  |
|----|----|----|
| |2||
|c|^^||

output

<table>
<thead>
<tr>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td colspan="2" rowspan="2">2</td>
</tr>
+ <tr>
+ <td colspan="2">c</td>
+ </tr>
</tbody>
</table>

expected

<table>
<thead>
<tr>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td colspan="2" rowspan="2">2</td>
</tr>
- <tr>
- <td colspan="2">c</td>
- </tr>
+ <tr>
+ <td>c</td>
+ </tr>
</tbody>
</table>