01e174e5fa
Updates all CMS updates to use: - Tailwind 3 (and the corresponding `tailwind.config.js` and PostCSS changes) - `remark@14` and `remark-html@15` (and the corresponding ESM breaking changes) - `date-fns` minor bump Ensured all CMS examples were: - Using `next/image` - Not using `as` for `next/link` (no longer needed)
7 lines
210 B
JavaScript
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()
|
|
}
|