App Router + MDX + remark-gfm, tables not rendering
Unanswered
Lucy posted this in #help-forum
LucyOP
next.config.mjsimport remarkGfm from "remark-gfm";
import createMDX from "@next/mdx";
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
mdxRs: true,
},
};
const withMDX = createMDX({
extension: /\.mdx?$/,
options: {
remarkPlugins: [remarkGfm],
rehypePlugins: [],
},
});
export default withMDX(nextConfig);I've enabled MDX and remark-gfm, and have the following markdown:
| Left | Centre | Right |
| :--- | :----: | ----: |
| 1 | 2 | 3 |When I render it however, it shows as
| Left | Centre | Right | | :--- | :----: | ----: | | 1 | 2 | 3 |Rather than properly rendering into a table. Any ideas?
9 Replies
LucyOP
When I plug the same input into the MDX playground, with remark-gfm enabled, it renders a table just fine
so I figure the breakdown must be on the next side somewhere
a little more exploration, it looks like github flavoured markdown isn't turning on at all
LucyOP
It seems someone has had the issue of remark now working before here https://discord.com/channels/752553802359505017/1079328754511400990, is it possible the docs are incorrect and this is not yet supported?
AHAH
what a stupid issue