rsc / markdown

Basic Markdown parser and HTML generator
BSD 3-Clause "New" or "Revised" License
81 stars 4 forks source link

Support escaped `|` in table cells #9

Closed matloob closed 8 months ago

matloob commented 8 months ago

Here's a program that runs goldmark and markdown on the following input https://go.dev/play/p/YgApD-obwxL

Foo | Bar
--- | ---
A   | a\\|b\\|c

rendered in github as

Foo Bar
A a\|b\|c

The output of the program is

markdown:
<table>
<thead>
<tr>
<th>Foo</th>
<th>Bar</th>
</tr>
</thead>
<tbody>
<tr>
<td>A</td>
<td>a\</td>
</tr>
</tbody>
</table>

goldmark:
<table>
<thead>
<tr>
<th>Foo</th>
<th>Bar</th>
</tr>
</thead>
<tbody>
<tr>
<td>A</td>
<td>a\|b\|c</td>
</tr>
</tbody>
</table>