UNPKG

myst-parser

Version:
10 lines (9 loc) 427 B
import { dollarmathPlugin } from 'markdown-it-dollarmath'; import { amsmathPlugin } from 'markdown-it-amsmath'; export function plugin(md, options) { const opts = options === true ? { amsmath: true, dollarmath: true } : options; if (opts === null || opts === void 0 ? void 0 : opts.dollarmath) dollarmathPlugin(md); if (opts === null || opts === void 0 ? void 0 : opts.amsmath) amsmathPlugin(md); }