From 299e2446b0a05c93b6a8836708c719ff31b68328 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Tue, 29 Nov 2022 08:35:46 +0100 Subject: [PATCH] Fixes #132 --- web/cm_plugins/block.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/cm_plugins/block.ts b/web/cm_plugins/block.ts index c8384f6..7369397 100644 --- a/web/cm_plugins/block.ts +++ b/web/cm_plugins/block.ts @@ -51,7 +51,11 @@ function hideNodes(view: EditorView) { node.name === "CodeMark" ) { const parent = node.node.parent!; - if (!isCursorInRange(view.state, [parent.from, parent.to])) { + // Hide ONLY if CodeMark is not insine backticks (InlineCode) and the cursor is placed outside + if ( + parent.node.name !== "InlineCode" && + !isCursorInRange(view.state, [parent.from, parent.to]) + ) { widgets.push( Decoration.line({ class: "sb-line-code-outside",