rsnext/examples/blog-starter/lib/markdownToHtml.ts
Max Proske 8783793273
Replace JS blog-starter example with TS, deprecate blog-starter-typescript example (#38395)
* Replace `blog-starter` JS example with `blog-starter-typescript`

* lint-fix, Revert pnpm-lock.yaml

* Revert root readme.md

* Add useful sections omitted from original Typescript convert

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-07-07 23:10:26 -05:00

7 lines
218 B
TypeScript

import { remark } from 'remark'
import html from 'remark-html'
export default async function markdownToHtml(markdown: string) {
const result = await remark().use(html).process(markdown)
return result.toString()
}