MCPcopy Create free account
hub / github.com/TruthHun/BookStack / isBlank

Function isBlank

static/word2md/turndown.js:601–609  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

599}
600
601function isBlank (node) {
602 //如果要忽略掉空白的表,请删除'TABLE','THEAD','TBODY','TR'
603 return (
604 ['A', 'TABLE','THEAD','TBODY','TR','TH', 'TD', 'IFRAME', 'SCRIPT', 'AUDIO', 'VIDEO'].indexOf(node.nodeName) === -1 &&
605 /^\s*$/i.test(node.textContent) &&
606 !isVoid(node) &&
607 !hasVoid(node)
608 )
609}
610
611function flankingWhitespace (node) {
612 var leading = '';

Callers 1

NodeFunction · 0.70

Calls 2

isVoidFunction · 0.85
hasVoidFunction · 0.85

Tested by

no test coverage detected