diff --git a/src/plugins/copilotPlugin.ts b/src/plugins/copilotPlugin.ts index c374341..419ac49 100644 --- a/src/plugins/copilotPlugin.ts +++ b/src/plugins/copilotPlugin.ts @@ -149,10 +149,7 @@ function addGhostMarksToTextNodes(tr: any, from: number, to: number, markType: a const end = Math.min(pos + node.nodeSize, to) if (end <= start) return true - const $pos = tr.doc.resolve(start) - if ($pos.parent.type.allowsMarkType?.(markType)) { - tr.addMark(start, end, markType.create()) - } + tr.addMark(start, end, markType.create()) return true }) }