Skip to content

Commit 7ef8c6f

Browse files
authored
fix: update regex for checklist items #2288 (#2305)
1 parent 97c1958 commit 7ef8c6f

File tree

1 file changed

+2
-2
lines changed
  • packages/core/src/blocks/ListItem/CheckListItem

1 file changed

+2
-2
lines changed

packages/core/src/blocks/ListItem/CheckListItem/block.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export const createCheckListItemBlockSpec = createBlockSpec(
148148
},
149149
inputRules: [
150150
{
151-
find: new RegExp(`\\[\\s*\\]\\s$`),
151+
find: new RegExp(`^\\[\\s*\\]\\s$`),
152152
replace() {
153153
return {
154154
type: "checkListItem",
@@ -160,7 +160,7 @@ export const createCheckListItemBlockSpec = createBlockSpec(
160160
},
161161
},
162162
{
163-
find: new RegExp(`\\[[Xx]\\]\\s$`),
163+
find: new RegExp(`^\\[[Xx]\\]\\s$`),
164164
replace() {
165165
return {
166166
type: "checkListItem",

0 commit comments

Comments
 (0)