import { slugify } from '../src/utils/slugify' ; import MarkdownIt from 'markdown-it' ; import { highlight , highlightLinePlugin , preWrapperPlugin } from './prism' ; import { containerPlugin } from './container' ; import { componentPlugin } from './component' ; const anchor = require ( 'markdown-it-anchor' ) ; const footnote = require ( 'markdown-it-footnote' ) ; const md = MarkdownIt ( { html : true , linkify : true , highlight , } ) ; md . use ( componentPlugin ) ; md . use ( highlightLinePlugin ) ; md . use ( preWrapperPlugin ) ; md . use ( containerPlugin ) ; md . use ( footnote ) ; md . use ( anchor , { slugify , permalink : true , permalinkBefore : true , permalinkSymbol : '#' , permalinkAttrs : ( ) => ( { 'aria-hidden' : true } ) , } ) ; export default md ;