diff --git a/src/rules.ts b/src/rules.ts index 4983a8ab48..7478556ffd 100644 --- a/src/rules.ts +++ b/src/rules.ts @@ -45,8 +45,8 @@ export const other = { blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, - listIsTask: /^\[[ xX]\] +\S/, - listReplaceTask: /^\[[ xX]\] +/, + listIsTask: /^\[[ xX]\](?:\s|$)/, + listReplaceTask: /^\[[ xX]\][ \t]*/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, diff --git a/test/specs/new/list_loose_tasks.html b/test/specs/new/list_loose_tasks.html index 1416f042ef..23e325eb9a 100644 --- a/test/specs/new/list_loose_tasks.html +++ b/test/specs/new/list_loose_tasks.html @@ -9,6 +9,6 @@
Task2
[ ]
+