#929·parsedown

Table parsing pull previous content into the header

Author: mikethea1Created Jan 6, 2026Updated May 15, 2026

Input:

echo (new Parsedown)->text(<<<MD
A

| B | C |
|-------------|---------|
| B1 | C1 |
MD);

Output:

<table>
<thead>
<tr>
<th>A</th>
<th>B</th>
<th>C</th>
</tr>
</thead>
<tbody>
<tr>
<td>B1</td>
<td>C1</td>
</tr>
</tbody>
</table>

Note that A has become a table header instead of being a separate paragraph.