From 3d6a64e58e971b47f744f3509edff0a29d035e02 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Thu, 23 Nov 2023 11:20:41 +0000 Subject: [PATCH] fix: Improved regex for task item rich text --- packages/nc-gui/helpers/dbTiptapExtensions/task-item.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/helpers/dbTiptapExtensions/task-item.ts b/packages/nc-gui/helpers/dbTiptapExtensions/task-item.ts index 1acb2733f4..be533a94d1 100644 --- a/packages/nc-gui/helpers/dbTiptapExtensions/task-item.ts +++ b/packages/nc-gui/helpers/dbTiptapExtensions/task-item.ts @@ -9,7 +9,7 @@ export interface TaskItemOptions { taskListTypeName: string } -export const inputRegex = /^\s*(\[([( |x])?\])\s$/ +export const inputRegex = /^\s*\[( |x)?\]\s$/i export const TaskItem = Node.create({ name: 'taskItem', @@ -178,7 +178,7 @@ export const TaskItem = Node.create({ find: inputRegex, type: this.type, getAttributes: (match) => ({ - checked: match[match.length - 1] === 'x', + checked: match[match.length - 1].toLowerCase() === 'x', }), }), ]