Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

remark-pangu

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

  • 2.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
42K
increased by16.72%
Maintainers
1
Weekly downloads
 
Created
Source

remark-pangu

travis build version MIT License semantic-release

给 Markdown 中英文自动插入空格的 remark 插件(使用 pangu.js)。

Install

npm install remark-pangu

Usage

remark().use(pangu)
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 开启处理:

remark().use(pangu, {
  inlineCode: true
})
Default Options
{
  text: true,
  inlineCode: false,
  link: true,
  image: true,
  imageReference: true,
  definition: true,
}

LICENSE

MIT

Keywords

FAQs

Package last updated on 25 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc