mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-02 18:51:25 +08:00
This commit is contained in:
parent
b6a7d7bb72
commit
21b86f5592
@ -11,7 +11,11 @@ export const turnIntoTaskList = (protyle: IProtyle, type: string, blockElement:
|
|||||||
["[]", "【】"].includes(editElement.innerHTML.substring(0, 2))
|
["[]", "【】"].includes(editElement.innerHTML.substring(0, 2))
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
const contextStartIndex = (editElement.innerHTML.indexOf("]") + 1) || (editElement.innerHTML.indexOf("】") + 1);
|
const contextStar2tIndex = (editElement.innerHTML.indexOf("】") + 1);
|
||||||
|
let contextStartIndex = (editElement.innerHTML.indexOf("]") + 1) || contextStar2tIndex;
|
||||||
|
if (contextStartIndex !== -1 && contextStar2tIndex < contextStartIndex) {
|
||||||
|
contextStartIndex = contextStar2tIndex;
|
||||||
|
}
|
||||||
const isDone = editElement.innerHTML.substring(1, 2).toLowerCase() === "x";
|
const isDone = editElement.innerHTML.substring(1, 2).toLowerCase() === "x";
|
||||||
if (blockElement.parentElement.classList.contains("li") &&
|
if (blockElement.parentElement.classList.contains("li") &&
|
||||||
blockElement.parentElement.childElementCount === 3 // https://ld246.com/article/1659315815506
|
blockElement.parentElement.childElementCount === 3 // https://ld246.com/article/1659315815506
|
||||||
|
Loading…
Reference in New Issue
Block a user