diff options
author | Ferdinand Thiessen <rpm@fthiessen.de> | 2022-07-15 12:05:27 +0300 |
---|---|---|
committer | Ferdinand Thiessen <rpm@fthiessen.de> | 2022-07-15 13:34:00 +0300 |
commit | 613b6898c066c7a84c7e0aebfe5a399d13ce1d9e (patch) | |
tree | e14eb2ed63ecb18fe3bd629addb5c8bc712710c6 /src/nodes | |
parent | 1b7d876711be312a5230cb4e970eb086c71700fb (diff) |
Fix parsing of whitespace used in task lists
Switch to @hedgedoc/markdown-it-task-lists to fix
parsing of task lists, namely allowing any whitespace
inside the brackets, as by the github markdown specs.
Doing this as markdown-it-task-lists seems orphaned,
while hedgedoc is maintained and the bug is fixed there.
This required adjusting the task-list testcase as the output is slightly different.
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
Diffstat (limited to 'src/nodes')
-rw-r--r-- | src/nodes/TaskItem.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nodes/TaskItem.js b/src/nodes/TaskItem.js index 74db3e82a..b602e9130 100644 --- a/src/nodes/TaskItem.js +++ b/src/nodes/TaskItem.js @@ -91,7 +91,7 @@ const TaskItem = TipTapTaskItem.extend({ return [ ...this.parent(), wrappingInputRule({ - find: /^\s*([-+*])\s(\[(x|X| ?)\])\s$/, + find: /^\s*([-+*])\s(\[(x|X|\s?)\])\s$/, type: this.type, getAttributes: match => ({ checked: 'xX'.includes(match[match.length - 1]), |