Marked version: 0.3.19, also test on masker
Markdown flavor: GitHub Flavored Markdown
For the markdown:
| Description |
| ------ |
| `a | b` |
Expected a one column table with a cell containing inline code a | b
<table>
<thead>
<tr>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>`a</td>
<td>b`</td>
</tr>
</tbody>
</table>
The second column should be removed. see https://github.github.com/gfm/#example-197
Also, I think this is already fixed in be922cecdd825350421be969777f7052c4cbc9e9
Yes 0.4.0 now drops the second column which matches what github does. Markdown-it still renders this as:
<table>
<thead>
<tr>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>a | b</code></td>
</tr>
</tbody>
</table>
but based on the GFM spec the current marked behavior seems correct
in order to achieve the expected result you would need to escape the pipe in code:
| Description |
| ------ |
| `a \| b` |
Most helpful comment
in order to achieve the expected result you would need to escape the pipe in code:
demo