mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 22:09:52 +08:00
Turndown: cover table from Microsoft Excel
This commit is contained in:
parent
dc9c9f6bbd
commit
e27907e5b4
@ -90,7 +90,7 @@ rules.tableRow = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
rules.table = {
|
rules.table = {
|
||||||
// Only convert tables with a heading row.
|
// If configs.autoHead is false, only convert tables with a heading row.
|
||||||
// Tables with no heading row are kept using `keep` (see below).
|
// Tables with no heading row are kept using `keep` (see below).
|
||||||
filter: function (node) {
|
filter: function (node) {
|
||||||
return node.nodeName === 'TABLE'
|
return node.nodeName === 'TABLE'
|
||||||
@ -142,7 +142,9 @@ function isFirstTbody (element) {
|
|||||||
(
|
(
|
||||||
previousSibling.nodeName === 'THEAD' &&
|
previousSibling.nodeName === 'THEAD' &&
|
||||||
/^\s*$/i.test(previousSibling.textContent)
|
/^\s*$/i.test(previousSibling.textContent)
|
||||||
)
|
) ||
|
||||||
|
// For parsting table from Microsoft Excel.
|
||||||
|
previousSibling.nodeName == 'COLGROUP'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user