MCPcopy Index your code
hub / github.com/TruthHun/BookStack / getOutermostNode

Function getOutermostNode

static/katex/katex.js:6456–6472  ·  view source on GitHub ↗
(node, side)

Source from the content-addressed store, hash-verified

6454
6455
6456var getOutermostNode = function getOutermostNode(node, side) {
6457 var partialGroup = buildHTML_checkPartialGroup(node);
6458
6459 if (partialGroup) {
6460 var children = partialGroup.children;
6461
6462 if (children.length) {
6463 if (side === "right") {
6464 return getOutermostNode(children[children.length - 1], "right");
6465 } else if (side === "left") {
6466 return getOutermostNode(children[0], "left");
6467 }
6468 }
6469 }
6470
6471 return node;
6472}; // Return math atom class (mclass) of a domTree.
6473// If `side` is given, it will get the type of the outermost node at given side.
6474
6475

Callers 1

getTypeOfDomTreeFunction · 0.70

Calls 1

Tested by

no test coverage detected