Skip to content

Commit

Permalink
Fix #951; Bad checkbox replacement when checking subtasks
Browse files Browse the repository at this point in the history
  • Loading branch information
mgmeyers committed May 18, 2024
1 parent bb2bc59 commit 2742d24
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Item/ItemContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ function checkCheckbox(stateManager: StateManager, title: string, checkboxIndex:
results.push(updates);
} else {
const check = match[3] === ' ' ? 'x' : ' ';
results.push(match[1] + match[2] + check + match[4] + line.slice(match[0].length));
const m1 = match[1] ?? '';
const m2 = match[2] ?? '';
const m4 = match[4] ?? '';
results.push(m1 + m2 + check + m4 + line.slice(match[0].length));
}
} else {
results.push(line);
Expand Down

0 comments on commit 2742d24

Please sign in to comment.