rsnext/examples/cms-tina/lib/markdownToHtml.js
James Perkins b5cc91e2ba
[examples] Add Tina CMS blog starter (#35045)
## Documentation / Examples

- Adding TInaCMS example using the traditional CMS example 


Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
2022-03-05 17:08:49 +00:00

7 lines
210 B
JavaScript

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