From 0fa8dfa063cbac88241979171020e0ecae71bd9d Mon Sep 17 00:00:00 2001 From: Caleb John Date: Wed, 22 Jul 2020 16:17:49 -0600 Subject: [PATCH] Desktop: Enforce that whitespace check for unindent checks the begining of a (#3515) --- .../gui/NoteEditor/NoteBody/CodeMirror/utils/useListIdent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useListIdent.ts b/ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useListIdent.ts index 222ce654790..aef9a7b6b91 100644 --- a/ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useListIdent.ts +++ b/ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useListIdent.ts @@ -52,7 +52,7 @@ export default function useListIdent(CodeMirror: any) { let start = listTokens[0].start; const token = extractListToken(line); - if (listTokens.length > 1 && listTokens[0].string.match(/\s/)) { + if (listTokens.length > 1 && listTokens[0].string.match(/^\s/)) { start = listTokens[1].start; }