From c8a8b584c42113c4817f278244fe641d3a7e5105 Mon Sep 17 00:00:00 2001 From: cnspray Date: Wed, 4 Mar 2020 15:04:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=A9=BA=E7=99=BD=E8=A1=8C?= =?UTF-8?q?=E8=A2=AB=E8=BF=87=E6=BB=A4=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/word2md/turndown.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/word2md/turndown.js b/static/word2md/turndown.js index ff1240bc..6f52fc49 100644 --- a/static/word2md/turndown.js +++ b/static/word2md/turndown.js @@ -599,8 +599,9 @@ function Node (node) { } function isBlank (node) { + //如果要忽略掉空白的表,请删除'TABLE','THEAD','TBODY','TR' return ( - ['A', 'TH', 'TD', 'IFRAME', 'SCRIPT', 'AUDIO', 'VIDEO'].indexOf(node.nodeName) === -1 && + ['A', 'TABLE','THEAD','TBODY','TR','TH', 'TD', 'IFRAME', 'SCRIPT', 'AUDIO', 'VIDEO'].indexOf(node.nodeName) === -1 && /^\s*$/i.test(node.textContent) && !isVoid(node) && !hasVoid(node)