This commit is contained in:
parent
681d6882b7
commit
32413fa11c
1 changed files with 2 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue