Checklist Parser: Make it a bit more robust

Allow the space after `[ ]` to be optional. Just like in Github.
This commit is contained in:
Vishesh Handa
2020-05-01 18:44:38 +02:00
parent 01db30c613
commit 70ec10b7bc
2 changed files with 5 additions and 5 deletions

View File

@ -43,7 +43,7 @@ class ChecklistItem {
class Checklist {
static final _pattern = RegExp(
r'^(.*)- \[([ xX])\] +(.*)$',
r'^(.*)- \[([ xX])\] ?(.*)$',
multiLine: false,
);