Use remark to covert markdown into HTML
To save myself the trouble of looking up how to do it in the future, here are the basic steps you need to get started converting markdown to HTML with remark.
First, install remark dependencies:
npm i remark remark-html
We will need the core library and a plugin for generating HTML. Then, import your dependencies and use them like so:
import remark from "remark"; import remarkHTML from "remark-html"; const html = remark().use(remarkHTML).processSync("Some **markdown** text");
Hope this guide helps you get up and running too!