mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
This commit is contained in:
parent
fa17345793
commit
7193cafcb1
1 changed files with 1 additions and 5 deletions
|
|
@ -1026,16 +1026,12 @@ export const turnsIntoTransaction = (options: {
|
|||
selectsElement = [options.nodeElement];
|
||||
}
|
||||
let isContinue = false;
|
||||
let hasEmbedBlock = false;
|
||||
let isList = false;
|
||||
selectsElement.find((item, index) => {
|
||||
if (item.classList.contains("li")) {
|
||||
isList = true;
|
||||
return true;
|
||||
}
|
||||
if (item.classList.contains("bq") || item.classList.contains("sb") || item.classList.contains("p")) {
|
||||
hasEmbedBlock = true;
|
||||
}
|
||||
if (item.nextElementSibling && selectsElement[index + 1] &&
|
||||
item.nextElementSibling === selectsElement[index + 1]) {
|
||||
isContinue = true;
|
||||
|
|
@ -1044,7 +1040,7 @@ export const turnsIntoTransaction = (options: {
|
|||
return true;
|
||||
}
|
||||
});
|
||||
if (isList || (hasEmbedBlock && options.type === "Blocks2Ps")) {
|
||||
if (isList) {
|
||||
return;
|
||||
}
|
||||
if (selectsElement.length === 1 && options.type === "Blocks2Hs" &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue