# remark-smartypants

> remark plugin to implement SmartyPants

Latest version **3.0.3** (published 2026-07-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install remark-smartypants
pnpm add remark-smartypants
yarn add remark-smartypants
bun add remark-smartypants
```

## Health

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

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.0.3 |
| Published | 2026-07-24 |
| First published | 2021-11-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=16.0.0 |
| Dependencies | 4 |
| Unpacked size | 7.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 75 |
| Author | Matija Marohnić |
| Maintainers | silvenon |
| Keywords | unified, remark, remark-plugin, smartypants, punctuation, typography, smart |

## Links

- npm: https://www.npmjs.com/package/remark-smartypants
- Repository: https://github.com/silvenon/remark-smartypants
- Homepage: https://github.com/silvenon/remark-smartypants#readme
- Issues: https://github.com/silvenon/remark-smartypants/issues
- npm.io page: https://npm.io/package/remark-smartypants

## Dependencies (4)

- [retext](https://npm.io/package/retext.md) ^9.0.0
- [unified](https://npm.io/package/unified.md) ^11.0.4
- [unist-util-visit](https://npm.io/package/unist-util-visit.md) ^5.0.0
- [retext-smartypants](https://npm.io/package/retext-smartypants.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

- 3.0.3 (latest) — 2026-07-24
- 3.0.2 — 2024-07-08
- 3.0.1 — 2024-04-25
- 3.0.0 — 2024-04-15
- 2.1.0 — 2024-01-04
- 2.0.0 — 2021-11-22

## README

# remark-smartypants

[![package version](https://badgen.net/npm/v/remark-smartypants)][npm]
[![number of downloads](https://badgen.net/npm/dt/remark-smartypants)][npm]

[remark] plugin to implement [SmartyPants]. Now with 100% more ESM!

## Installing

```sh
# using npm
npm install remark-smartypants

# using yarn
yarn add remark-smartypants
```

## Usage

Example using [remark]:

```js
import remark from "remark";
import smartypants from "remark-smartypants";

const result = await remark().use(smartypants).process("# <<Hello World!>>");

console.log(String(result));
// # «Hello World!»
```

I created this plugin because I wanted to add SmartyPants to [MDX]:

```js
import mdx from "@mdx-js/mdx";
import smartypants from "remark-smartypants";

const result = await mdx("# ---Hello World!---", {
  remarkPlugins: [smartypants],
});
```

Note that angle quotes in the former example (`<<...>>`) are probably impossible in MDX because there they are invalid syntax.

This plugin uses [retext-smartypants](https://github.com/retextjs/retext-smartypants) under the hood, so it takes the same options:

```js
const result = await remark()
  .use(smartypants, { dashes: "oldschool" })
  .process("en dash (--), em dash (---)");
```

## License

[MIT License, Copyright (c) Matija Marohnić](./LICENSE)

[npm]: https://www.npmjs.com/package/remark-smartypants
[remark]: https://remark.js.org
[SmartyPants]: https://daringfireball.net/projects/smartypants
[MDX]: https://mdxjs.com

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