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

Function elementEmptier

static/word2md/mammoth.browser.js:2294–2301  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

2292}
2293
2294function elementEmptier(element) {
2295 var children = removeEmpty(element.children);
2296 if (children.length === 0 && !ast.isVoidElement(element)) {
2297 return [];
2298 } else {
2299 return [ast.elementWithTag(element.tag, children)];
2300 }
2301}
2302
2303function textEmptier(node) {
2304 if (node.value.length === 0) {

Callers

nothing calls this directly

Calls 1

removeEmptyFunction · 0.70

Tested by

no test coverage detected