UNPKG

markmap-lib

Version:

Visualize your Markdown as mindmaps with Markmap

42 lines (38 loc) 918 B
"use strict"; exports.__esModule = true; exports.plugin = void 0; const styles = []; const scripts = [{ type: 'iife', data: { fn: mathJax => { mathJax.options = Object.assign({ skipHtmlTags: { '[-]': ['code', 'pre'] } }, mathJax.options); mathJax.startup = Object.assign({ typeset: false }, mathJax.startup); window.MathJax = mathJax; }, getParams: context => [Object.assign({}, context.mathJax)] } }, { type: 'script', data: { src: 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js' } }]; function initialize(Markmap, options) { Markmap.transformHtml.tap((mm, nodes) => { var _MathJax$typeset, _MathJax; (_MathJax$typeset = (_MathJax = window.MathJax).typeset) == null ? void 0 : _MathJax$typeset.call(_MathJax, nodes); }); } const plugin = { styles, scripts, initialize }; exports.plugin = plugin;