chore: Remove unused link decoration logic

This commit is contained in:
Tom Moor
2024-03-09 00:17:48 -05:00
parent 34e8a64b50
commit 128f6cca77
2 changed files with 2 additions and 71 deletions

View File

@@ -1,19 +0,0 @@
import { Node } from "prosemirror-model";
import { findChildren, NodeWithPos } from "./findChildren";
export default function findLinkNodes(doc: Node): NodeWithPos[] {
const textNodes = findChildren(doc, (child) => child.isText);
const nodes: NodeWithPos[] = [];
for (const nodeWithPos of textNodes) {
const hasLinkMark = nodeWithPos.node.marks.find(
(mark) => mark.type.name === "link"
);
if (hasLinkMark) {
nodes.push(nodeWithPos);
}
}
return nodes;
}