From 544711d651d9072c0151696bce358901be27b3f9 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 28 May 2022 10:45:46 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/5029 --- app/src/protyle/wysiwyg/enter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/protyle/wysiwyg/enter.ts b/app/src/protyle/wysiwyg/enter.ts index fd92ee793..788c21d95 100644 --- a/app/src/protyle/wysiwyg/enter.ts +++ b/app/src/protyle/wysiwyg/enter.ts @@ -256,7 +256,7 @@ export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle } range.extractContents(); const types = protyle.toolbar.getCurrentType(range); - if (types.length > 0 && range.startContainer.nodeType !== 3) { + if (types.includes("inline-code") && range.startContainer.nodeType !== 3) { // https://github.com/siyuan-note/siyuan/issues/4169 const brElement = document.createElement("br"); (range.startContainer as HTMLElement).after(brElement);