This commit is contained in:
Vanessa 2024-02-06 09:45:08 +08:00
parent d01fec553d
commit aa6e044cc5
5 changed files with 9 additions and 7 deletions

View file

@ -16,9 +16,9 @@ export const mathRender = (element: Element, cdn = Constants.PROTYLE_CDN, maxWid
if (mathElements.length === 0) {
return;
}
addStyle(`${cdn}/js/katex/katex.min.css?v=0.16.0`, "protyleKatexStyle");
addScript(`${cdn}/js/katex/katex.min.js?v=0.16.0`, "protyleKatexScript").then(() => {
addScript(`${cdn}/js/katex/mhchem.min.js?v=0.16.0`, "protyleKatexMhchemScript").then(() => {
addStyle(`${cdn}/js/katex/katex.min.css?v=0.16.9`, "protyleKatexStyle");
addScript(`${cdn}/js/katex/katex.min.js?v=0.16.9`, "protyleKatexScript").then(() => {
addScript(`${cdn}/js/katex/mhchem.min.js?v=0.16.9`, "protyleKatexMhchemScript").then(() => {
mathElements.forEach((mathElement: HTMLElement) => {
if (mathElement.getAttribute("data-render") === "true") {
return;