# remark-pangu

> Remark plugin to Automatically insert whitespace between CJK (Chinese, Japanese, Korean) and half-width characters (alphabetical letters, numerical digits and symbols) by using pangu.js

Latest version **2.2.0** (published 2020-10-25) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2020-10-25 |
| First published | 2017-09-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 3 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 30 |
| Author | VincentBel |
| Maintainers | vincentbel |
| Keywords | pangu, remark, plugin, spacing |

## Links

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

## Dependencies (3)

- [pangu](https://npm.io/package/pangu.md) ^4.0.7
- [unist-util-is](https://npm.io/package/unist-util-is.md) ^4.0.2
- [unist-util-visit](https://npm.io/package/unist-util-visit.md) ^2.0.2

## 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

- 2.2.0 (latest) — 2020-10-25
- 2.1.1 — 2020-05-04
- 2.1.0 — 2020-05-04
- 2.0.0 — 2020-05-04
- 1.0.1 — 2017-09-08
- 1.0.0 — 2017-09-08

## README

# remark-pangu

[![travis build](https://img.shields.io/travis/VincentBel/remark-pangu.svg?style=flat-square)](https://travis-ci.org/VincentBel/remark-pangu)
[![version](https://img.shields.io/npm/v/remark-pangu.svg?style=flat-square)](http://npm.im/remark-pangu)
[![MIT License](https://img.shields.io/npm/l/remark-pangu.svg?style=flat-square)](http://opensource.org/licenses/MIT)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)

给 Markdown 中英文自动插入空格的 [remark](https://github.com/wooorm/remark) 插件（使用 [pangu.js](https://github.com/vinta/pangu.js)）。

## Install

```bash
npm install remark-pangu
```

## Usage

```js
remark().use(pangu)
```

```js
const remark = require('remark')
const pangu = require('remark-pangu')

const doc = '中文abc中文';
remark().use(pangu).process(doc, (err, file) => {
  console.log(String(file));
});
// => 中文 abc 中文
```

### Options

可以通过设置 options 控制是否处理不同类型的 Markdown 节点。

例如，此插件默认不处理 `inline code`，可以设置 `inlineCode: true` 开启处理：

```js
remark().use(pangu, {
  inlineCode: true
})
```

#### Default Options

```js
{
  text: true,
  inlineCode: false,
  link: true,
  image: true,
  imageReference: true,
  definition: true,
}
```

## LICENSE

[MIT](./LICENSE)

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