mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-27 20:26:47 +02:00
refactor(katex): revision changes
This commit is contained in:
@@ -240,7 +240,7 @@ export const calculateMathMLDimensions = async (text: string, config: MermaidCon
|
|||||||
* @returns String containing MathML if KaTeX is supported, or an error message if it is not and stylesheets aren't present
|
* @returns String containing MathML if KaTeX is supported, or an error message if it is not and stylesheets aren't present
|
||||||
*/
|
*/
|
||||||
export const renderKatex = async (text: string, config: MermaidConfig): Promise<string> => {
|
export const renderKatex = async (text: string, config: MermaidConfig): Promise<string> => {
|
||||||
if ((hasKatex(text) && isMathMLSupported()) || (!isMathMLSupported() && config.legacyMathML)) {
|
if (hasKatex(text) && (isMathMLSupported() || config.legacyMathML)) {
|
||||||
// @ts-ignore @types/katex does not work
|
// @ts-ignore @types/katex does not work
|
||||||
const katex = (await import('katex')).default;
|
const katex = (await import('katex')).default;
|
||||||
return text
|
return text
|
||||||
|
Reference in New Issue
Block a user