Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/nodes
diff options
context:
space:
mode:
authorFerdinand Thiessen <rpm@fthiessen.de>2022-07-15 12:05:27 +0300
committerFerdinand Thiessen <rpm@fthiessen.de>2022-07-15 13:34:00 +0300
commit613b6898c066c7a84c7e0aebfe5a399d13ce1d9e (patch)
treee14eb2ed63ecb18fe3bd629addb5c8bc712710c6 /src/nodes
parent1b7d876711be312a5230cb4e970eb086c71700fb (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.js2
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]),