From 6f98a458b5d52df83af78eb15b6e3d3d987efe91 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Thu, 10 Jul 2025 14:58:24 -0700 Subject: [PATCH] Update todo formatting --- packages/todo/src/todoEditor.tsx | 14 +++++++------- packages/todo/src/todoKeymap.ts | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/todo/src/todoEditor.tsx b/packages/todo/src/todoEditor.tsx index 60bd895..ef1d8d1 100644 --- a/packages/todo/src/todoEditor.tsx +++ b/packages/todo/src/todoEditor.tsx @@ -157,17 +157,17 @@ const getDefaultDocument = () => { return ` # Today -- [ ] Sample task with a due date @${today} -- [ ] You can use a #tag to filter todos - - [ ] A sub task! Create nested todos by indenting with -- [x] Complete a todo by pressing -- [ ] You can also set a time estimate for todos (press the play button to start) 10m +[ ] Sample task with a due date @${today} +[ ] You can use a #tag to filter todos + [ ] A sub task! Create nested todos by indenting with +[x] Complete a todo by pressing +[ ] You can also set a time estimate for todos (press the play button to start) 10m # This week -- [ ] Another todo with a due date @${future} +[ ] Another todo with a due date @${future} # Later -- [ ] I use later as a junk drawer for todos I don't want to forget +[ ] I use later as a junk drawer for todos I don't want to forget `.trim() } diff --git a/packages/todo/src/todoKeymap.ts b/packages/todo/src/todoKeymap.ts index 5d27bdf..d8c92d6 100644 --- a/packages/todo/src/todoKeymap.ts +++ b/packages/todo/src/todoKeymap.ts @@ -24,7 +24,7 @@ export const buildKeyBindings = ( const line = state.doc.lineAt(head) if (line.text.trim() === "") { - const newTodo = "- [ ] " + const newTodo = "[ ] " view.dispatch({ changes: { from: line.from, to: line.to, insert: newTodo }, selection: { anchor: line.to + newTodo.length },