# @putout/processor-markdown

> 🐊Putout processor adds ability to parse markdown files and lint JavaScript, JSX, TypeScript and JSON snippets

Latest version **14.2.0** (published 2026-09-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @putout/processor-markdown
pnpm add @putout/processor-markdown
yarn add @putout/processor-markdown
bun add @putout/processor-markdown
```

## Health

**Score 60/100 (C)** — status: active.

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

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 14.2.0 |
| Published | 2026-09-08 |
| First published | 2020-11-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=22 |
| Dependencies | 10 |
| Unpacked size | 9.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 795 |
| Author | coderaiser |
| Maintainers | coderaiser |
| Keywords | putout, putout-processor, markdown |

## Links

- npm: https://www.npmjs.com/package/@putout/processor-markdown
- Repository: https://github.com/coderaiser/putout
- Homepage: https://github.com/coderaiser/putout/tree/master/packages/processor-markdown#readme
- Issues: https://github.com/coderaiser/putout/issues
- npm.io page: https://npm.io/package/@putout/processor-markdown

## Dependencies (10)

- [once](https://npm.io/package/once.md) ^1.4.0
- [unified](https://npm.io/package/unified.md) ^11.0.3
- [happy-mark](https://npm.io/package/happy-mark.md) ^1.0.2
- [remark-parse](https://npm.io/package/remark-parse.md) ^11.0.0
- [remark-stringify](https://npm.io/package/remark-stringify.md) ^11.0.0
- [unist-util-visit](https://npm.io/package/unist-util-visit.md) ^5.0.0
- [unified-lint-rule](https://npm.io/package/unified-lint-rule.md) ^3.0.0
- [remark-frontmatter](https://npm.io/package/remark-frontmatter.md) ^5.0.0
- [@putout/operator-json](https://npm.io/package/@putout/operator-json.md) ^3.0.0
- [remark-preset-lint-consistent](https://npm.io/package/remark-preset-lint-consistent.md) ^6.0.0

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 14.2.0 (latest) — 2026-09-08
- 14.1.0 — 2026-09-05
- 14.0.5 — 2026-06-14
- 14.0.4 — 2026-06-14
- 14.0.3 — 2026-06-14
- 14.0.1 — 2026-06-13
- 14.0.0 — 2026-06-12
- 13.1.2 — 2026-01-26
- 13.1.1 — 2026-01-26
- 13.1.0 — 2026-01-25
- 13.0.0 — 2026-01-05
- 12.2.0 — 2025-02-04
- 12.1.0 — 2024-05-16
- 12.0.0 — 2024-01-16
- 11.0.0 — 2023-11-14
- … 44 more at https://npm.io/package/@putout/processor-markdown/versions

## README

# @putout/processor-markdown [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/processor-markdown.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/processor-markdown "npm"

> **Markdown**, the simple and easy-to-use markup language you can use to format virtually any document.
>
> (c) [markdownguide.org](https://www.markdownguide.org/)

🐊[**Putout**](https://github.com/coderaiser/putout) processor adds ability to get **JavaScript**, **JSX**, **JSON** and **TypeScript** code from **Markdown** files.

## Install

```
npm i @putout/processor-markdown -D
```

## Config

```json
{
    "processors": ["markdown"]
}
```

## Usage

Processor converts `markdown` to JavaScript, it looks like this.

```yaml
# hello
```

Became:

```js
__putout_processor_markdown([
    header(1, 'hello'),
]);
```

### Writing Putout Plugins for Markdown

#### The core idea

Under the hood, `@putout/processor-markdown` uses a small library called [`happy-mark`](https://github.com/coderaiser/happy-mark) to turn your document into nested function calls. A heading becomes a call to `heading(...)`, a paragraph becomes `paragraph(...)`, a link becomes `link(...)`, and so on. For example, this Markdown:

```md
# Hello world

Some *emphasis* and a [link](https://example.com).
```

turns into this JavaScript:

```js
heading(1, 'Hello world');
paragraph('Some ', italic('emphasis'), ' and a ', link('link', 'https://example.com'), '.');
```

## Rules

Checkout `markdown`-related rules in [`@putout/plugin-markdown`](https://github.com/coderaiser/putout/tree/master/packages/plugin-markdown)

## License

MIT

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