import unified from 'unified' ; import { Node } from 'unist' ; import html from 'rehype-stringify' ; import rehype from 'remark-rehype' ; const processor = unified ( ) . use ( rehype ) . use ( html ) ; export default async function markdownToHTML ( node ) { let rehyped = await processor . run ( node ) ; return processor . stringify ( rehyped ) ; }