mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 17:50:37 +08:00
This commit is contained in:
parent
7cf370d04c
commit
888e71e39e
@ -327,7 +327,7 @@ export class Toolbar {
|
|||||||
// 遇到以下类型结尾不应继承 https://github.com/siyuan-note/siyuan/issues/7200
|
// 遇到以下类型结尾不应继承 https://github.com/siyuan-note/siyuan/issues/7200
|
||||||
let removeIndex = 0;
|
let removeIndex = 0;
|
||||||
while (removeIndex < rangeTypes.length) {
|
while (removeIndex < rangeTypes.length) {
|
||||||
if (["inline-memo", "text", "block-ref", "file-annotation-ref", "a"].includes(rangeTypes[removeIndex])) {
|
if (["inline-memo", "text", "block-ref", "virtual-block-ref", "file-annotation-ref", "a"].includes(rangeTypes[removeIndex])) {
|
||||||
rangeTypes.splice(removeIndex, 1);
|
rangeTypes.splice(removeIndex, 1);
|
||||||
} else {
|
} else {
|
||||||
++removeIndex;
|
++removeIndex;
|
||||||
@ -422,12 +422,16 @@ export class Toolbar {
|
|||||||
if (isEndSpan) {
|
if (isEndSpan) {
|
||||||
let removeIndex = 0;
|
let removeIndex = 0;
|
||||||
while (removeIndex < rangeTypes.length) {
|
while (removeIndex < rangeTypes.length) {
|
||||||
if (["inline-memo", "text", "block-ref", "file-annotation-ref", "a"].includes(rangeTypes[removeIndex])) {
|
if (["inline-memo", "text", "block-ref", "virtual-block-ref", "file-annotation-ref", "a"].includes(rangeTypes[removeIndex])) {
|
||||||
rangeTypes.splice(removeIndex, 1);
|
rangeTypes.splice(removeIndex, 1);
|
||||||
} else {
|
} else {
|
||||||
++removeIndex;
|
++removeIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// https://github.com/siyuan-note/siyuan/issues/14421
|
||||||
|
if (rangeTypes.length === 0) {
|
||||||
|
rangeTypes.push(type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
inlineElement.setAttribute("data-type", [...new Set(rangeTypes)].join(" "));
|
inlineElement.setAttribute("data-type", [...new Set(rangeTypes)].join(" "));
|
||||||
inlineElement.textContent = Constants.ZWSP;
|
inlineElement.textContent = Constants.ZWSP;
|
||||||
|
Loading…
Reference in New Issue
Block a user