1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Fixed regex to stop [anytingx] being counted as a checkmark

This commit is contained in:
Ben Coleman
2017-12-12 13:34:37 +00:00
parent 4c3e62efad
commit 48fd1d11e2
2 changed files with 7 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ export function getTodoStatus (content) {
splitted.forEach((line) => {
const trimmedLine = line.trim()
if (trimmedLine.match(/^[\+\-\*] \[\s|x\] ./)) {
if (trimmedLine.match(/^[\+\-\*] \[(\s|x)\] ./)) {
numberOfTodo++
}
if (trimmedLine.match(/^[\+\-\*] \[x\] ./)) {