marked
marked copied to clipboard
Table without external | symbols and empty rows is not parsed correctly
Marked version: 4.3.0
Describe the bug When I try to render the following markdown:
Column 1 | Column 2
---------|---------
Data1 | Data2
|
Data4 | Data5
I get:
It works fine if I remove the empty row, also it works fine if I put '|' symbols on the outside of the table, like this:
| Column 1 | Column 2 |
|----------|--------- |
| Data1. | Data2 |
| | |
| Data4 | Data5 |
To Reproduce Steps to reproduce the behavior:
Parse the following:
Column 1 | Column 2
---------|---------
Data1 | Data2
|
Data4 | Data5
Expected behavior
The expected behavior is a rendered table with three rows, one of which is empty
We try to match what the same markdown looks like in GitHub. Here is what that markdown looks like on GitHub:
| Column 1 | Column 2 |
|---|---|
| Data1 | Data2 |
| Data4 | Data5 |
So this is correctly rendered.