1

I'm creating a blog using Next.js + MDX-Bundler and trying to use remark-disable-tokenizers to disable "indented codeblock". But i'm not able to make it work. I found a reference here which says that we can use remark-disable-tokenizers for this purpose.

Here is my xdmoptions for reference:

import disableTokens from 'remark-disable-tokenizers';

xdmOptions(options) {
    options.rehypePlugins = [
        ...(options.rehypePlugins ?? []),
        rehypeSlug,
        rehypeCodeTitles,
        rehypePrism,
        [disableTokens,
            {
                block: [
                    ['indentedCode', 'indented code is not supported by MDX-Bundler']
                ]
            }],
        [
            rehypeAutolinkHeadings,
            {...}
        ]
    ];

    return options;
},
Gangula
  • 5,193
  • 4
  • 30
  • 59

0 Answers0