An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: https://github.com/siyuan-note/siyuan/issues/10789
Vanessa8853b9a19234
diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.tsindex c444bc3897..16ebcdd2be 100644--- a/app/src/protyle/render/av/cell.ts+++ b/app/src/protyle/render/av/cell.ts@@ -18,10 +18,12 @@ const renderCellURL = (urlContent: string) => {let suffix = "";try {const urlObj = new URL(urlContent);- host = urlObj.host;- suffix = urlObj.href.replace(urlObj.origin, "");- if (suffix.length > 12) {- suffix = suffix.substring(0, 4) + "..." + suffix.substring(suffix.length - 6);+ if (urlObj.protocol.startsWith("http")) {+ host = urlObj.host;+ suffix = urlObj.href.replace(urlObj.origin, "");+ if (suffix.length > 12) {+ suffix = suffix.substring(0, 4) + "..." + suffix.substring(suffix.length - 6);+ }}} catch (e) {// 不是 url 地址diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.tsindex 831f7dac02..2219bd3121 100644--- a/app/src/protyle/wysiwyg/index.ts+++ b/app/src/protyle/wysiwyg/index.ts@@ -1983,14 +1983,7 @@ export class WYSIWYG {// 需放在嵌入块之前,否则嵌入块内的引用、链接、pdf 双链无法点击打开 https://ld246.com/article/1630479789513const blockRefElement = hasClosestByAttribute(event.target, "data-type", "block-ref");const aElement = hasClosestByAttribute(event.target, "data-type", "a") || hasClosestByAttribute(event.target, "data-type", "url");- let aLink = "";- if (aElement) {- if (aElement.classList.contains("av__celltext")) {- aLink = aElement.textContent.trim();- } else {- aLink = aElement.getAttribute("data-href");- }- }+ const aLink = aElement ? aElement.getAttribute("data-href") : "";if (blockRefElement || aLink.startsWith("siyuan://blocks/")) {event.stopPropagation();event.preventDefault();