1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

Merge pull request #1287 from nebbers1111/master

Fixed regex to stop [anytingx] being counted as a checkmark
This commit is contained in:
Kazz Yokomizo
2017-12-14 12:25:34 +09:00
committed by GitHub
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\] ./)) {