diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts index 28a8dcfaa..0091f0b6a 100644 --- a/app/src/protyle/render/av/action.ts +++ b/app/src/protyle/render/av/action.ts @@ -344,7 +344,7 @@ export const avContextmenu = (protyle: IProtyle, rowElement: HTMLElement, positi if (cellElement.getAttribute("data-detached") === "true") { content = cellElement.querySelector(".av__celltext").textContent; } else { - content = `((${id} '${cellElement.querySelector(".av__celltext").textContent.replace(/\n/g, " ")}'))`; + content = `((${id} '${cellElement.querySelector(".av__celltext").textContent.replace(/[\n]+/g, " ")}'))`; } if (ids.length > 1) { text += "* "; @@ -413,7 +413,7 @@ export const avContextmenu = (protyle: IProtyle, rowElement: HTMLElement, positi if (cellElement.getAttribute("data-detached") === "true") { content = cellElement.querySelector(".av__celltext").textContent; } else { - content = `[${cellElement.querySelector(".av__celltext").textContent.replace(/\n/g, " ")}](siyuan://blocks/${id})`; + content = `[${cellElement.querySelector(".av__celltext").textContent.replace(/[\n]+/g, " ")}](siyuan://blocks/${id})`; } if (ids.length > 1) { text += "* ";