An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: 子菜单位置
Vanessa05958328f549
diff --git a/app/src/menus/Menu.ts b/app/src/menus/Menu.tsindex 5fc8a75b42..610266bf03 100644--- a/app/src/menus/Menu.ts+++ b/app/src/menus/Menu.ts@@ -34,7 +34,8 @@ export class Menu {const rect = subMenuElement.getBoundingClientRect();let style = "";const leftPosition = rect.left - this.element.clientWidth - rect.width- if (rect.right > window.innerWidth && Math.abs(leftPosition) < (rect.right - window.innerWidth)) {+ if (rect.right > window.innerWidth && (+ leftPosition > 0 || Math.abs(leftPosition) < (rect.right - window.innerWidth))) {if (leftPosition >= 0) {style = "left:auto;right:100%;";} else {diff --git a/app/src/protyle/markdown/highlightRender.ts b/app/src/protyle/markdown/highlightRender.tsindex bf70a8a49a..c5c4725c12 100644--- a/app/src/protyle/markdown/highlightRender.ts+++ b/app/src/protyle/markdown/highlightRender.ts@@ -64,15 +64,15 @@ export const highlightRender = (element: Element, cdn = Constants.PROTYLE_CDN) =language = "plaintext";}block.classList.add("hljs");- block.innerHTML = hljs.highlight(- block.textContent + (block.textContent.endsWith("\n") ? "" : "\n"), // https://github.com/siyuan-note/siyuan/issues/4609- {- language,- ignoreIllegals: true- }).value;-+ // TODO 等待讨论是否需要渲染 if (!hasClosestByAttribute(block, "id", "searchPreview", true) || isPreview) {+ block.innerHTML = hljs.highlight(+ block.textContent + (block.textContent.endsWith("\n") ? "" : "\n"), // https://github.com/siyuan-note/siyuan/issues/4609+ {+ language,+ ignoreIllegals: true+ }).value;+ // }block.setAttribute("data-render", "true");-const autoEnter = block.parentElement.getAttribute("linewrap");const ligatures = block.parentElement.getAttribute("ligatures");const lineNumber = block.parentElement.getAttribute("linenumber");