Vanessa 2025-12-01 19:48:44 +08:00
parent 107284c799
commit 2fe3534ffd

View file

@ -41,9 +41,9 @@ export const getTextStar = (blockElement: HTMLElement, contentOnly = false) => {
} else if (blockElement.classList.contains("render-node")) { } else if (blockElement.classList.contains("render-node")) {
// 需在嵌入块后,代码块前 // 需在嵌入块后,代码块前
refText += blockElement.dataset.subtype || Lute.UnEscapeHTMLStr(blockElement.getAttribute("data-content")); refText += blockElement.dataset.subtype || Lute.UnEscapeHTMLStr(blockElement.getAttribute("data-content"));
} else if (["NodeBlockquote", "NodeList", "NodeSuperBlock", "NodeListItem"].includes(dataType)) { } else if (["NodeBlockquote", "NodeCallout", "NodeList", "NodeSuperBlock", "NodeListItem"].includes(dataType)) {
Array.from(blockElement.querySelectorAll("[data-node-id]")).find((item: HTMLElement) => { Array.from(blockElement.querySelectorAll("[data-node-id]")).find((item: HTMLElement) => {
if (!["NodeBlockquote", "NodeList", "NodeSuperBlock", "NodeListItem"].includes(item.getAttribute("data-type"))) { if (!["NodeBlockquote", "NodeCallout", "NodeList", "NodeSuperBlock", "NodeListItem"].includes(item.getAttribute("data-type"))) {
// 获取子块内容,使用容器块本身的 ID // 获取子块内容,使用容器块本身的 ID
refText = getTextStar(item, true); refText = getTextStar(item, true);
return true; return true;