This should be considered as a valid table (GitHub can also render it):
| First Header |
Second header |
Third Header |
| Content Cell |
Content Cell |
|
However this won't pass if I put it in integration.spec.ts:
it('should deal with tables even the cells and the table width do not match', () => {
const text = `
| First Header | Second header | Third Header |
|----------------------------------|----------|--------------|
| Content Cell | Content Cell |
`;
const actual = markdownToBlocks(text);
const expected = [
notion.table(
[
notion.tableRow([
[notion.richText('First Header')],
[notion.richText('Second header')],
[notion.richText('Third Header')],
]),
notion.tableRow([
[notion.richText('Content Cell')],
[notion.richText('Content Cell')],
[notion.richText('')],
]),
],
3
),
];
expect(actual).toStrictEqual(expected);
});
Tried to fix it by myself but I'm not very familiar with compilers so I'm afraid there's nothing much I can do