Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// ensure the list section is closed and added to the sections list.
// _closeCurrentSection handles pushing list items onto the list section
this._closeCurrentSection();
forEach(node.childNodes, (node) => {
this.parseNode(node);
});
return;
}
}
switch (node.nodeType) {
case NODE_TYPES.TEXT:
this.parseTextNode(node);
break;
case NODE_TYPES.ELEMENT:
this.parseElementNode(node);
break;
}
}
// ensure the list section is closed and added to the sections list.
// _closeCurrentSection handles pushing list items onto the list section
this._closeCurrentSection();
forEach(node.childNodes, (node) => {
this.parseNode(node);
});
return;
}
}
switch (node.nodeType) {
case NODE_TYPES.TEXT:
this.parseTextNode(node);
break;
case NODE_TYPES.ELEMENT:
this.parseElementNode(node);
break;
}
}