mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-30 13:28:48 +01:00
🎨 set katex.options.trust to true (#8951)
This commit is contained in:
parent
e555ea7886
commit
0684145b44
1 changed files with 4 additions and 2 deletions
|
|
@ -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, maxWid
|
|||
renderElement.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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue