Skip to content

Commit

Permalink
add test quantizor#241
Browse files Browse the repository at this point in the history
  • Loading branch information
simezi committed Apr 17, 2019
1 parent c0912a1 commit 8b72282
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions index.compiler.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1561,6 +1561,61 @@ describe('GFM tables', () => {
</tbody>
</table>
`);
});

it('#241 should not ignore the first cell when its contents is empty', () => {
render(
compiler(
[
'| Foo | Bar | Baz |',
'| --- | --- | --- |',
'| | 2 | 3 |',
'| | 5 | 6 |',
].join('\n')
)
);

expect(root.innerHTML).toMatchInlineSnapshot(`
<table data-reactroot>
<thead>
<tr>
<th>
Foo
</th>
<th>
Bar
</th>
<th>
Baz
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
</td>
<td>
2
</td>
<td>
3
</td>
</tr>
<tr>
<td>
</td>
<td>
5
</td>
<td>
6
</td>
</tr>
</tbody>
</table>
`);
});

Expand Down

0 comments on commit 8b72282

Please sign in to comment.