🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more
Socket
Book a DemoInstallSign in
Socket

remark-lint-spaces-around-word

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-lint-spaces-around-word

remark lint plugin that checks if there are spaces between English word and Chinese

latest
Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
1.2K
30.47%
Maintainers
1
Weekly downloads
 
Created
Source

remark-lint-spaces-around-word

According to chinese-document-style-guide, there should be spaces between English word and Chinese characters. This lint will warn when space is missing in such cases.

Example

valid.md

In

这是一份中文 API 文档。

Out

No messages.

invalid.md

In

这是一份中文API文档。

Out

input.md:1:7-1:9: Should have spaces around "API"

Install

npm install remark-lint-spaces-around-word

Usage

You probably want to use it on the CLI through a config file:

 ...
 "remarkConfig": {
   "plugins": [
     ...
     "remark-lint",
+    "remark-lint-spaces-around-word",
     ...
   ]
 }
 ...

Or use it on the CLI directly

remark -u remark-lint -u remark-lint-spaces-around-word readme.md

Or use this on the API:

 var remark = require('remark');
 var report = require('vfile-reporter');

 remark()
   .use(require('remark-lint'))
+  .use(require('remark-lint-spaces-around-word'))
   .process('_Emphasis_ and **importance**', function (err, file) {
     console.error(report(err || file));
   });

License

MIT © LaySent

Keywords

remark

FAQs

Package last updated on 18 Feb 2021

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