From e299d18756d48a190a1bdb5c4ef0030541237508 Mon Sep 17 00:00:00 2001 From: RAR Date: Mon, 16 Oct 2023 14:33:47 +0200 Subject: [PATCH 1/2] fix: Task list - always add unfinished task in the new line This is how Github handles it. It makes sense, as you add new task, you probably want to finish them in the future (not add them as finished). --- core/src/components/TextArea/handleKeyDown.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/components/TextArea/handleKeyDown.tsx b/core/src/components/TextArea/handleKeyDown.tsx index 6f3d0016f..93c16c070 100644 --- a/core/src/components/TextArea/handleKeyDown.tsx +++ b/core/src/components/TextArea/handleKeyDown.tsx @@ -115,10 +115,12 @@ export default function handleKeyDown( startStr = '\n* '; } - if (currentLineStr.startsWith('- [ ]')) { + if ( + currentLineStr.startsWith('- [ ]') || + currentLineStr.startsWith('- [X]') || + currentLineStr.startsWith('- [x]') + ) { startStr = '\n- [ ] '; - } else if (currentLineStr.startsWith('- [X]') || currentLineStr.startsWith('- [x]')) { - startStr = '\n- [X] '; } if (/^\d+.\s/.test(currentLineStr)) { From 33b5bfc915264353e60aa5435b5c861c05ed9774 Mon Sep 17 00:00:00 2001 From: RAR Date: Mon, 16 Oct 2023 14:25:04 +0200 Subject: [PATCH 2/2] fix: Added issue, table, help to commands --- core/src/commands/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/commands/index.ts b/core/src/commands/index.ts index 3f700db57..1d6e82708 100644 --- a/core/src/commands/index.ts +++ b/core/src/commands/index.ts @@ -23,6 +23,7 @@ import { title4 } from './title4'; import { title5 } from './title5'; import { title6 } from './title6'; import { table } from './table'; +import { issue } from './issue'; import { help } from './help'; export interface CommandOrchestrator { @@ -202,6 +203,9 @@ export { unorderedListCommand, orderedListCommand, checkedListCommand, + table, + issue, + help, codeEdit, codeLive, codePreview,