(node, side)
| 6408 | |
| 6409 | |
| 6410 | const getOutermostNode = function getOutermostNode(node, side) { |
| 6411 | const partialGroup = checkPartialGroup(node); |
| 6412 | |
| 6413 | if (partialGroup) { |
| 6414 | const children = partialGroup.children; |
| 6415 | |
| 6416 | if (children.length) { |
| 6417 | if (side === "right") { |
| 6418 | return getOutermostNode(children[children.length - 1], "right"); |
| 6419 | } else if (side === "left") { |
| 6420 | return getOutermostNode(children[0], "left"); |
| 6421 | } |
| 6422 | } |
| 6423 | } |
| 6424 | |
| 6425 | return node; |
| 6426 | }; // Return math atom class (mclass) of a domTree. |
| 6427 | // If `side` is given, it will get the type of the outermost node at given side. |
| 6428 | |
| 6429 |
no test coverage detected