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: set `katex.options.trust` to `true` (#8951)
Yingyi / 颖逸0684145b446c
diff --git a/app/src/protyle/render/mathRender.ts b/app/src/protyle/render/mathRender.tsindex 4368ff0ec9..8c4a4bcf92 100644--- a/app/src/protyle/render/mathRender.ts+++ b/app/src/protyle/render/mathRender.ts@@ -8,7 +8,8 @@ declare const katex: {renderToString(math: string, option: {displayMode: boolean;output: string;- macros: IObject+ macros: IObject;+ trust: boolean;}): string;};@@ -45,7 +46,8 @@ export const mathRender = (element: Element, cdn = Constants.PROTYLE_CDN, maxWidrenderElement.innerHTML = katex.renderToString(Lute.UnEscapeHTMLStr(mathElement.getAttribute("data-content")), {displayMode: mathElement.tagName === "DIV",output: "html",- macros+ macros,+ trust: true, // REF: https://katex.org/docs/supported#html});renderElement.classList.remove("ft__error");const blockElement = hasClosestBlock(mathElement);