Skip to content

Commit

Permalink
Use a bullet instead of a dash for the task
Browse files Browse the repository at this point in the history
  • Loading branch information
zefhemel committed Sep 29, 2024
1 parent fca5d2a commit 3b13787
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions plugs/tasks/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: "* [ ]",
},
});
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3b13787

Please sign in to comment.