🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

remark-lint-spaces-around-number

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

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

0.1.2
latest
Source
npm
Version published
Weekly downloads
17K
19.55%
Maintainers
1
Weekly downloads
 
Created
Source

remark-lint-spaces-around-number

According to chinese-document-style-guide, one way of organize number and Chinese is to have space in between. This lint will warn when space is missing in such cases.

Example

valid.md

In

理财产品的收益是 4.0% 左右。

Out

No messages.

invalid.md

In

理财产品的收益是 4.0%左右。

Out

input.md:1:10-1:13: Should have space after "4.0%"

Install

npm install remark-lint-spaces-around-number

Usage

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

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

Or use it on the CLI directly

remark -u remark-lint -u remark-lint-spaces-around-number 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-number'))
   .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