diff --git a/src/muya/lib/parser/render/renderBlock/renderLeafBlock.js b/src/muya/lib/parser/render/renderBlock/renderLeafBlock.js index 65ce30df..2b5fb25d 100644 --- a/src/muya/lib/parser/render/renderBlock/renderLeafBlock.js +++ b/src/muya/lib/parser/render/renderBlock/renderLeafBlock.js @@ -1,4 +1,5 @@ import katex from 'katex' +import 'katex/dist/contrib/mhchem.min.js' import prism, { loadedCache, transfromAliasToOrigin } from '../../../prism/' import { CLASS_OR_ID, DEVICE_MEMORY, PREVIEW_DOMPURIFY_CONFIG, HAS_TEXT_BLOCK_REG } from '../../../config' import { tokenizer } from '../../' diff --git a/src/muya/lib/parser/render/renderInlines/inlineMath.js b/src/muya/lib/parser/render/renderInlines/inlineMath.js index 49d4fde2..c3eb4be2 100644 --- a/src/muya/lib/parser/render/renderInlines/inlineMath.js +++ b/src/muya/lib/parser/render/renderInlines/inlineMath.js @@ -1,4 +1,5 @@ import katex from 'katex' +import 'katex/dist/contrib/mhchem.min.js' import { CLASS_OR_ID } from '../../../config' import { htmlToVNode } from '../snabbdom' diff --git a/src/muya/lib/utils/exportHtml.js b/src/muya/lib/utils/exportHtml.js index ab94e4fd..4e7802ab 100644 --- a/src/muya/lib/utils/exportHtml.js +++ b/src/muya/lib/utils/exportHtml.js @@ -1,6 +1,7 @@ import marked from '../parser/marked' import Prism from 'prismjs' import katex from 'katex' +import 'katex/dist/contrib/mhchem.min.js' import loadRenderer from '../renderers' import githubMarkdownCss from 'github-markdown-css/github-markdown.css' import exportStyle from '../assets/styles/exportStyle.css'