marked icon indicating copy to clipboard operation
marked copied to clipboard

Table without external | symbols and empty rows is not parsed correctly

Open tubignat opened this issue 3 years ago • 1 comments

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:

image

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

tubignat avatar Aug 01 '23 13:08 tubignat

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.

UziTech avatar Aug 01 '23 15:08 UziTech