UNPKG

@pierre/diffs

Version:

15 lines (14 loc) 493 B
//#region src/utils/getLineNodes.ts function getLineNodes(nodes) { let firstChild = nodes.children[0]; while (firstChild != null) { if (firstChild.type === "element" && firstChild.tagName === "code") return firstChild.children; if ("children" in firstChild) firstChild = firstChild.children[0]; else firstChild = null; } console.error(nodes); throw new Error("getLineNodes: Unable to find children"); } //#endregion export { getLineNodes }; //# sourceMappingURL=getLineNodes.js.map