Closed kellyjosephprice closed 1 month ago
Not sure I fully understand the content logic, but generally makes sense to me so I'm good with this!
Well, it's mostly just looking for any block content in a table cell. Except for the case when the editor likes to wrap the table cell content in a paragraph
. So it tries to ignore that paragraph
.
🧰 Changes
Fixes saving 'complex' tables.
In a prior PR, I added a new node type
tableau
to represent tables with block content. This mostly worked for the editor, but not when doingmdx(mdast(doc))
. This PR adds a transformer, so the atableau
is converted to a JSX table just like regulartable
's.This also adds the check so, if a
tableau
no longer has block content, it's saved as markdown!🧬 QA & Testing
Hard to test outside the main app.