Added html table support using Remark-GFM
| Next.js, website
HTML Tables aren't supported by Remark right out of the box, but there's a plugin that uses the Github approach (GFM).
A good tutorial on how to use it can be found here: How to support tables in remark
My unified call ended up looking like this:
import html from 'rehype-stringify'
import remarkGfm from 'remark-gfm'
import remarkParse from 'remark-parse'
import remark2rehype from 'remark-rehype'
import { unified } from 'unified'
const processedContent = await unified()
.use(remarkParse)
.use(remarkGfm)
.use(remark2rehype)
.use(highlight)
.use(html)
.process(matterResult.content)