Skip to content

Commit

Permalink
🎨 fix #11772
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Jun 20, 2024
1 parent 681d688 commit 32413fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/protyle/wysiwyg/turnIntoList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import * as dayjs from "dayjs";

export const turnIntoTaskList = (protyle: IProtyle, type: string, blockElement: HTMLElement, editElement: HTMLElement, range: Range) => {
if (type !== "NodeCodeBlock" &&
blockElement.parentElement.getAttribute("data-subtype") !== "t" &&
// 任务列表首块不需要再更新为任务列表
!blockElement.previousElementSibling?.classList.contains("protyle-action--task") &&
(
["[ ]", "[x]", "[X]", "【 】", "【x】", "【X】"].includes(editElement.innerHTML.substring(0, 3)) ||
["[]", "【】"].includes(editElement.innerHTML.substring(0, 2))
Expand Down

0 comments on commit 32413fa

Please sign in to comment.