fix: Enable import of tables from HTML that contain headings or lists
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user