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

remark-lint-match-punctuation

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-lint-match-punctuation

remark lint plugin that checks punctuation are used in pair

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
782
decreased by-7.89%
Maintainers
1
Weekly downloads
 
Created
Source

remark-lint-match-punctuation

Warn when punctuations are not matched. For example, when there is only left parenthesis without right parenthesis, or when right parenthesis is before left parenthesis.

Only punctuations with left/right difference will be included to check, such as Chinese quotation marks, parenthesis, angle quotes, etc. Currently, plugin will check the usage of following punctuation:

(), <>, {}, [], “”, 『』, (), 《》, 「」, 【】, ‘’

Example

valid.md

In

子曰:“学而时习之,不亦说乎”

Out

No messages.

invalid.md

In

子曰:”学而时习之,不亦说乎“

Out

input.md:1:4: "”" is used without matching "“"
input.md:1:15: "“" is used without matching "”"

(In above example, double quotation marks are used in wrong order, right is before left)

Install

npm install remark-lint-match-punctuation

Usage

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

 ...
 "remarkConfig": {
   "plugins": [
     ...
     "remark-lint",
+    "remark-lint-match-punctuation",
     ...
   ]
 }
 ...

Or use it on the CLI directly

remark -u remark-lint -u remark-lint-match-punctuation 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-match-punctuation'))
   .process('_Emphasis_ and **importance**', function (err, file) {
     console.error(report(err || file));
   });

License

MIT © LaySent

Keywords

FAQs

Package last updated on 02 Mar 2019

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