fix: Enable import of tables from HTML that contain headings or lists

This commit is contained in:
Tom Moor
2024-05-02 21:19:44 -04:00
parent 760909b506
commit adc4f2b544

View File

@@ -234,19 +234,7 @@ const nodeContains = (node: HTMLElement, types: string | string[]) => {
};
const tableShouldBeHtml = (tableNode: HTMLElement) =>
nodeContains(tableNode, "code") ||
nodeContains(tableNode, [
"UL",
"OL",
"H1",
"H2",
"H3",
"H4",
"H5",
"H6",
"HR",
"BLOCKQUOTE",
]);
nodeContains(tableNode, ["code", "table"]);
// Various conditions under which a table should be skipped - i.e. each cell
// will be rendered one after the other as if they were paragraphs.