Project: micromark/micromark-extension-mdx-md

Package: micromark-extension-mdx-md@1.0.0

  1. Dependents: 0
  2. micromark extension to turn some markdown features off for MDX
  1. unified 181
  2. markdown 154
  3. micromark 37
  4. mdx 35
  5. micromark-extension 17
  6. mdxjs 9
  7. md 4


Build Coverage Downloads Size Sponsors Backers Chat

micromark extension to turn some markdown features off for MDX.


What is this?

This package contains an extension to turn off some markdown constructs when parsing.

When to use this

This project is useful when you want to disable support for code (indented), autolinks, and HTML (flow and text) in markdown.

You can use this extension when you are working with micromark. To support all MDX features, use micromark-extension-mdxjs instead.

All these packages are used in remark-mdx, which focusses on making it easier to transform content by abstracting these internals away.


This package is ESM only. In Node.js (version 16+), install with npm:

npm install micromark-extension-mdx-md

In Deno with esm.sh:

import {mdxMd} from 'https://esm.sh/micromark-extension-mdx-md@2'

In browsers with esm.sh:

<script type="module">
  import {mdxMd} from 'https://esm.sh/micromark-extension-mdx-md@2?bundle'


import {micromark} from 'micromark'
import {mdxMd} from 'micromark-extension-mdx-md'

const output = micromark('\ta', {extensions: [mdxMd()]})





This package exports the identifier mdxMd. There is no default export.


Create an extension for micromark to disable some CommonMark syntax (code (indented), autolinks, and HTML (flow and text)) for MDX.


Extension for micromark that can be passed in extensions to disable some CommonMark syntax for MDX (Extension).


To improve authoring the new constructs MDX adds (ESM, expressions, and JSX), some markdown features are turned off by this extension. There are good alternatives.

Code (indented)

Use fenced code instead. Change the following markdown:




Use links (with a resource or a reference) instead. Change the following markdown:



[descriptive text](https://and-the-link-here.com)
HTML (flow and text)

Use JSX instead: change <img> into <img />. Not supporting HTML also means that HTML comments are not supported. Use a comment in an empty expression instead. Change <!-- comment --> into {/* comment */}.


This package is fully typed with TypeScript. It exports no additional types.


Projects maintained by the unified collective are compatible with maintained versions of Node.js.

When we cut a new major release, we drop support for unmaintained versions of Node. This means we try to keep the current release line, micromark-extension-mdx-md@^2, compatible with Node.js 16. This package works with micromark@^3.


This package is safe.


See contributing.md in micromark/.github for ways to get started. See support.md for ways to get help.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.


MIT © Titus Wormer