Skip to content

Commit

Permalink
more flexible parser (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
baseballyama committed Jul 18, 2024
1 parent a5166ab commit a5ebc62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/extension-task-item/src/task-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ export const TaskItem = Node.create<TaskItemOptions>({
checked: {
default: false,
keepOnSplit: false,
parseHTML: element => element.getAttribute('data-checked') === 'true',
parseHTML: element => element.hasAttribute('data-checked') && element.getAttribute('data-checked') !== 'false',
renderHTML: attributes => ({
'data-checked': attributes.checked ? 'true' : undefined,
'data-checked': attributes.checked,
}),
},
}
Expand Down

0 comments on commit a5ebc62

Please sign in to comment.