import MarkdownIt from 'markdown-it' import mk from './plugin/markdown-it-katex' import highlight from './plugin/highlight' const options: MarkdownIt.Options = { html: true, highlight } export default function () { const md = MarkdownIt(options) md.use(mk, { throwOnError: false, errorColor: ' #cc0000', strict: 'error' }) return md }