mirror of
https://github.com/kremalicious/portfolio.git
synced 2024-12-23 01:29:41 +01:00
9 lines
248 B
TypeScript
9 lines
248 B
TypeScript
|
import { remark } from 'remark'
|
||
|
import html from 'remark-html'
|
||
|
import gfm from 'remark-gfm'
|
||
|
|
||
|
export async function markdownToHtml(markdown: string) {
|
||
|
const result = await remark().use(gfm).use(html).process(markdown)
|
||
|
return result.toString()
|
||
|
}
|