This commit is contained in:
Zef Hemel
2022-12-22 16:20:05 +01:00
parent fbb45f0525
commit cca48f66cd
10 changed files with 306 additions and 34 deletions
-17
View File
@@ -52,23 +52,6 @@ function hideNodes(state: EditorState) {
}
}
}
if (
node.name === "CodeMark"
) {
const parent = node.node.parent!;
// Hide ONLY if CodeMark is not insine backticks (InlineCode) and the cursor is placed outside
if (
parent.node.name !== "InlineCode" &&
!isCursorInRange(state, [parent.from, parent.to])
) {
widgets.push(
Decoration.line({
class: "sb-line-code-outside",
}).range(node.from),
);
}
}
},
});
return Decoration.set(widgets, true);