File size: 277 Bytes
1e92f2d
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
import type { VFileCompatible } from "vfile";
import { remark } from "remark";
import html from "remark-html";

export default async function markdownToHtml(markdown: VFileCompatible) {
  const result = await remark().use(html).process(markdown);
  return result.toString();
}