Fix checkmark regex to apply for lists only

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-04-21 09:27:51 +02:00
parent bf8810e6e0
commit 79a5d9e769

View File

@@ -107,10 +107,10 @@ export default {
currentBoard: state => state.currentBoard,
}),
checkListCount() {
return (this.card.description.match(/\[\s*\x*\]/g) || []).length
return (this.card.description.match(/^\s*(\*|-|(\d\.))\s+\[\s*(\s|x)\s*\](.*)$/gim) || []).length
},
checkListCheckedCount() {
return (this.card.description.match(/\[\s*x\s*\]/g) || []).length
return (this.card.description.match(/^\s*(\*|-|(\d\.))\s+\[\s*x\s*\](.*)$/gim) || []).length
},
compactMode() {
return false