dprint/dprint-plugin-markdown

Excess cells in a table row disappear in output

satyarohith opened this issue · 3 comments

Input

| name                                 |                   description                              |
| ------------------------ | ------------------------------ |
| `get(key: name): string | null` | Get the value of the string.             |

Expected output

| name                            | description                  |
| ------------------------------- | ---------------------------- |
| `get(key: name): string | null` | Get the value of the string. |

Actual output

| name                    | description |
| ----------------------- | ----------- |
| `get(key: name): string | null`       |

I looked into this and the pipe character needs to be escaped within the code block. https://stackoverflow.com/a/17320389/188246

That said, it shouldn't be swallowing the third column.

It looks like we will have to parse out extra cells manually. Some reading: https://github.github.com/gfm/#tables-extension-

I believe the extra cells could be parsed out, then the cell contents could be reparsed with pulldown-cmark. Kind of sucks though...