Vanessa 2025-09-29 11:36:26 +08:00
parent fa17345793
commit 7193cafcb1

View file

@ -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" &&