CODEBASE: Generate display data for math notation at built time and remove runtime mathjax dependency (#2447)

This commit is contained in:
catloversg
2026-01-18 05:41:24 +07:00
committed by GitHub
parent be16b2a375
commit c8e3eb2050
25 changed files with 910 additions and 584 deletions
@@ -0,0 +1,9 @@
import React from "react";
import Typography from "@mui/material/Typography";
import { convertMathNotation } from "../root";
export function MathNotationOutput({ notation }: { notation: string }): JSX.Element {
// It's fine to use dangerouslySetInnerHTML here. We control the data in both MathNotation.json and
// MathNotationOutput.json. They are not user-provided data.
return <Typography dangerouslySetInnerHTML={{ __html: convertMathNotation(notation) }} />;
}