dart-lang / markdown

A Dart markdown library
https://pub.dev/packages/markdown
BSD 3-Clause "New" or "Revised" License
441 stars 201 forks source link

paragraph + table is not rendered separately #543

Closed isoos closed 1 year ago

isoos commented 1 year ago

The base table rendering works:

 dart run markdown --extension-set GitHubWeb

| `dfn <command>`                   | description                                         |
| --------------------------------- | --------------------------------------------------- |
| `dfn`                             | core tool                                           |
| `dfn <script>`                    | run a registered script                             |

<table>
<thead>
<tr>
<th><code>dfn &lt;command&gt;</code></th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>dfn</code></td>
<td>core tool</td>
</tr>
<tr>
<td><code>dfn &lt;script&gt;</code></td>
<td>run a registered script</td>
</tr>
</tbody>
</table>

However, if we put a paragraph right before the table, the table is treated as part of the paragraph:

x
| `dfn <command>`                   | description                                         |
| --------------------------------- | --------------------------------------------------- |
| `dfn`                             | core tool                                           |
| `dfn <script>`                    | run a registered script                             |

<p>x
| <code>dfn &lt;command&gt;</code>                   | description                                         |
| --------------------------------- | --------------------------------------------------- |
| <code>dfn</code>                             | core tool                                           |
| <code>dfn &lt;script&gt;</code>                    | run a registered script                             |</p>
isoos commented 1 year ago

@srawlins @chenzhiguang any estimate when the next version will get published with this fix?