From e5e2245a2d6229551fbbf5bc1b8714a759136ea8 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Sun, 29 Sep 2024 13:29:37 +0200 Subject: [PATCH] Use a bullet instead of a dash for the task --- plugs/tasks/task.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/plugs/tasks/task.ts b/plugs/tasks/task.ts index 8f1100fd..3da3ad30 100644 --- a/plugs/tasks/task.ts +++ b/plugs/tasks/task.ts @@ -178,13 +178,13 @@ export function previewTaskToggle(eventString: string) { } } -async function convertListItemToTask(node: ParseTree){ +async function convertListItemToTask(node: ParseTree) { const listMark = node.children![0]; await editor.dispatch({ changes: { from: listMark.from, to: listMark.to, - insert: "- [ ]", + insert: "* [ ]", }, }); } @@ -334,17 +334,16 @@ export async function taskCycleCommand() { return; } console.log("Node", node); - const taskNode = - node.type === "Task" - ? node - : findParentMatching(node!, (n) => n.type === "Task"); + const taskNode = node.type === "Task" + ? node + : findParentMatching(node!, (n) => n.type === "Task"); if (taskNode) { const taskState = findNodeOfType(taskNode!, "TaskState"); if (taskState) { await cycleTaskState(taskState); } - return + return; } // Convert a bullet point to a task