# What changed in mdast-util-to-markdown

> 11 changes in mdast-util-to-markdown 2 from its official release notes, upgrade guides and advisories: 3 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/mdast-util-to-markdown/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## mdast-util-to-markdown 2

### New APIs and options

- Unsafe patterns can now specify afterNode, allowing developers to configure this additional pattern property. (2.2.0) — [release notes](https://github.com/syntax-tree/mdast-util-to-markdown/releases/tag/2.2.0)
- Unsafe patterns can now specify beforeNode, allowing developers to configure this additional pattern property. (2.2.0) — [release notes](https://github.com/syntax-tree/mdast-util-to-markdown/releases/tag/2.2.0)
- Unsafe patterns can now specify unicode, allowing developers to configure this additional pattern property. (2.2.0) — [release notes](https://github.com/syntax-tree/mdast-util-to-markdown/releases/tag/2.2.0)

### Performance

- Fixes quadratic position lookup. (2.1.3) — [release notes](https://github.com/syntax-tree/mdast-util-to-markdown/releases/tag/2.1.3)

### Fixes and other changes

- Fixes handling of astral characters, such as emoji, around attention. (2.1.3) — [release notes](https://github.com/syntax-tree/mdast-util-to-markdown/releases/tag/2.1.3)
- Fixes forming attention in complex cases. (2.1.3) — [release notes](https://github.com/syntax-tree/mdast-util-to-markdown/releases/tag/2.1.3)
- Fixes escaping in autolinks. (2.1.3) — [release notes](https://github.com/syntax-tree/mdast-util-to-markdown/releases/tag/2.1.3)
- Fixes encoding a break before attention. (2.1.3) — [release notes](https://github.com/syntax-tree/mdast-util-to-markdown/releases/tag/2.1.3)
- Fixes handling around kinds of HTML. (2.1.3) — [release notes](https://github.com/syntax-tree/mdast-util-to-markdown/releases/tag/2.1.3)
- Fixes unnecessary escaping of intraword underscores. (2.1.3) — [release notes](https://github.com/syntax-tree/mdast-util-to-markdown/releases/tag/2.1.3)
- Fixes encoding line endings and blank lines in paragraphs. (2.1.3) — [release notes](https://github.com/syntax-tree/mdast-util-to-markdown/releases/tag/2.1.3)
