# markdown-exit

> A TypeScript rewrite of markdown-it with enhancements

Latest version **1.3.0** (published 2026-08-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install markdown-exit
pnpm add markdown-exit
yarn add markdown-exit
bun add markdown-exit
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2026-08-24 |
| First published | 2025-08-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 7 |
| Unpacked size | 160.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1364 |
| Maintainers | serkodev |
| Keywords | markdown, parser, commonmark, markdown-it, markdown-it-plugin, markdown-exit |

## Links

- npm: https://www.npmjs.com/package/markdown-exit
- Repository: https://github.com/serkodev/markdown-exit
- Homepage: https://github.com/serkodev/markdown-exit#readme
- Issues: https://github.com/serkodev/markdown-exit/issues
- npm.io page: https://npm.io/package/markdown-exit

## Dependencies (7)

- [mdurl](https://npm.io/package/mdurl.md) ^2.0.0
- [entities](https://npm.io/package/entities.md) ^7.0.0
- [uc.micro](https://npm.io/package/uc.micro.md) ^2.1.0
- [linkify-it](https://npm.io/package/linkify-it.md) ^5.0.1
- [punycode.js](https://npm.io/package/punycode.js.md) ^2.3.1
- [@types/mdurl](https://npm.io/package/@types/mdurl.md) ^2.0.0
- [@types/linkify-it](https://npm.io/package/@types/linkify-it.md) ^5.0.0

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.3.0 (latest) — 2026-08-24
- 0.5.0 (legacy) — 2026-08-24
- 1.2.1 — 2026-08-24
- 1.2.0 — 2026-08-22
- 1.1.0-beta.2 — 2026-05-31
- 1.1.0-beta.1 — 2026-05-31
- 0.4.0 — 2026-05-31
- 1.0.0-beta.9 — 2026-03-04
- 0.3.2 — 2026-03-04
- 1.0.0-beta.8 — 2026-02-17
- 0.3.1 — 2026-02-17
- 1.0.0-beta.7 — 2025-12-30
- 1.0.0-beta.6 — 2025-11-04
- 0.3.0 — 2025-11-04
- 1.0.0-beta.5 — 2025-11-04
- … 10 more at https://npm.io/package/markdown-exit/versions

## README

![markdown-exit banner](https://markdown-exit.pages.dev/banner.svg)

# markdown-exit

[![npm version][npm-version-src]][npm-version-href]
[![bundle][bundle-src]][bundle-href]
[![License][license-src]][license-href]
[![CodSpeed][codspeed-src]][codspeed-href]

A TypeScript rewrite of [markdown-it](https://github.com/markdown-it/markdown-it) with first-class typings, modern tooling, and enhancements.

## Features

- 🛡️ **Type Safety:** Ship robust types, improve DX, and enable type-safe development.
- ⚡ **New features:** [Async rendering](https://markdown-exit.pages.dev/guide/rendering.html#async-rendering) for all rules includeing syntax highlighting and [more](https://github.com/serkodev/markdown-exit/issues?q=is:issue%20label:features).
- 🔌 **Extensibility:** Extend the markdown syntax, custom rendering with [Plugins](https://markdown-exit.pages.dev/guide/plugins.html).
- 🤝 **Compatibility:** Compatible with markdown-it `v14.3.0` and plugin API.

## Documentation

Read the [documentation](https://markdown-exit.pages.dev/) for more details.

## Installation

v1+ [`@latest`](https://www.npmjs.com/package/markdown-exit/v/latest): All new features and may include breaking changes.

> [!IMPORTANT]
> 🚧 **markdown-exit** v1 is currently in **public beta** (`v1.0.0-beta.*`).  
> Breaking changes may occur until a stable `v1.0.0` is released.

```bash
npm i markdown-exit
```

<details>
<summary>v0.x <a href="https://www.npmjs.com/package/markdown-exit/v/legacy"><code>@legacy</code></a></summary>

Full compatibility with markdown-it usage while adding TypeScript support, bug fixes and performance improvements. ([v0](https://github.com/serkodev/markdown-exit/tree/v0) branch)

```bash
npm i markdown-exit@legacy
```

</details>

## Usage

```ts
import { createMarkdownExit } from 'markdown-exit'

// factory helper
const md = createMarkdownExit()
const html = md.render('# markdown-exit')
```

```ts
import { MarkdownExit } from 'markdown-exit'

// with the `new` keyword
const md = new MarkdownExit()
const html = md.render('# markdown-exit')
```

<details>
<summary>Default import</summary>

> [!NOTE]
> Default export (with callable constructor support) is retained for markdown-it compatibility, but it may have drawbacks in module interop and tree-shaking.

```ts
import MarkdownExit from 'markdown-exit'

// callable function
const md = MarkdownExit()
md.render('# markdown-exit')
```

```ts
// with the `new` keyword
const md = new MarkdownExit()
md.render('# markdown-exit')
```
</details>

### Guides

- [Markdown Syntax](https://markdown-exit.pages.dev/guide/markdown-syntax.html)
- [Redering](https://markdown-exit.pages.dev/guide/rendering.html)
- [Plugins](https://markdown-exit.pages.dev/guide/plugins.html)

## Migrate from markdown-it

Drop-in replacement for markdown-it with enhancements, see [Migration Guide](https://markdown-exit.pages.dev/guide/migrate-from-markdown-it.html) for details.

```diff
- import MarkdownIt from 'markdown-it'
+ import MarkdownExit from 'markdown-exit'
```

## Credits

This project owes its foundation to the [markdown-it](https://github.com/markdown-it/markdown-it) community and all its [contributors](https://github.com/markdown-it/markdown-it/graphs/contributors).

### Authors of markdown-it
- Alex Kocharin [github/rlidwka](https://github.com/rlidwka)
- Vitaly Puzrin [github/puzrin](https://github.com/puzrin)

### Special Thanks

- [John MacFarlane](https://github.com/jgm) for the CommonMark spec and reference implementations.
- [Definition owners](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/a26d35b5c331fbdb512ac7dfb1b846d282336c67/.github/CODEOWNERS#L4713C1-L4713C106) of [@types/markdown-it](https://www.npmjs.com/package/@types/markdown-it) for the type definitions reference.
- [Anthony Fu](https://github.com/antfu) for inspiring async rendering by [markdown-it-async](https://github.com/antfu/markdown-it-async).

## License

[MIT License](./LICENSE) © [Alex Kocharin](https://github.com/rlidwka), [Vitaly Puzrin](https://github.com/puzrin), [SerKo](https://github.com/serkodev)

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/markdown-exit?style=flat&colorA=00AF6B&colorB=000
[npm-version-href]: https://npmjs.com/package/markdown-exit
[bundle-src]: https://img.shields.io/bundlephobia/minzip/markdown-exit?style=flat&colorA=00AF6B&colorB=000&label=minzip
[bundle-href]: https://bundlephobia.com/result?p=markdown-exit
[license-src]: https://img.shields.io/github/license/serkodev/markdown-exit.svg?style=flat&colorA=00AF6B&colorB=000
[license-href]: https://github.com/serkodev/markdown-exit/blob/main/LICENSE
[codspeed-src]: https://img.shields.io/badge/CodSpeed-benchmark-blue
[codspeed-href]: https://codspeed.io/serkodev/markdown-exit?utm_source=badge

---
_Source: https://npm.io/package/markdown-exit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
