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 - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

8

index.js

@@ -5,6 +5,2 @@ const rule = require('unified-lint-rule');

const pairs = [
'()',
'<>',
'{}',
'[]',
'“”',

@@ -45,4 +41,4 @@ '『』',

function processor(tree, file) {
const processors = pairs.map(pair => new Validator(pair, file));
function processor(tree, file, config = pairs) {
const processors = config.map(pair => new Validator(pair, file));
toList(tree, (list) => {

@@ -49,0 +45,0 @@ list.forEach((node) => {

{
"name": "remark-lint-match-punctuation",
"version": "0.1.1",
"version": "0.2.0",
"author": "LaySent <laysent@gmail.com>",

@@ -5,0 +5,0 @@ "bugs": {

@@ -10,4 +10,20 @@ # remark-lint-match-punctuation

`()`, `<>`, `{}`, `[]`, `“”`, `『』`, `()`, `《》`, `「」`, `【】`, `‘’`
`“”`, `『』`, `()`, `《》`, `「」`, `【】`, `‘’`
## Option
If you would like to override the default punctuation check list above, you can
pass a list of pairs as configuration. It should be a list of string, with first
character representing the left punctuation and second character representing
it's right pair.
For example:
```javascript
[require('remark-lint-match-punctuation'), ['()']]
```
This will override the default behavior and only warn when `()` has any
mismatch.
## Example

@@ -81,3 +97,3 @@

.use(require('remark-lint'))
+ .use(require('remark-lint-match-punctuation'))
+ .use(require('remark-lint-match-punctuation')[, options])
.process('_Emphasis_ and **importance**', function (err, file) {

@@ -84,0 +100,0 @@ console.error(report(err || file));

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