New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

remark-lint-no-repeat-punctuation

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-lint-no-repeat-punctuation - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

15

index.js
const rule = require('unified-lint-rule');
const remove = require('unist-util-remove');
const map = require('unist-util-map');
const toList = require('unist-util-to-list-of-char');

@@ -33,5 +33,12 @@

}
const withoutCode = remove(tree, 'inlineCode');
toList(withoutCode, 'paragraph', callback);
toList(withoutCode, 'heading', callback);
const inlineCodeReplaced = map(tree, (node) => {
if (node.type !== 'inlineCode') return node;
/**
* Change the value of code, so that lint rule won't throw error for anything inside.
* However, don't change the position info, so that warning still shows the correct position.
*/
return Object.assign({}, node, { value: '\u200b' });
});
toList(inlineCodeReplaced, 'paragraph', callback);
toList(inlineCodeReplaced, 'heading', callback);
}

@@ -38,0 +45,0 @@

{
"name": "remark-lint-no-repeat-punctuation",
"version": "0.1.2",
"version": "0.1.3",
"author": "LaySent <laysent@gmail.com>",

@@ -24,3 +24,3 @@ "bugs": {

"unified-lint-rule": "^1.0.3",
"unist-util-remove": "^1.0.1",
"unist-util-map": "^1.0.4",
"unist-util-to-list-of-char": "^0.1.2"

@@ -41,3 +41,3 @@ },

},
"gitHead": "a507c63dbeca9cc31353211b28b364842a639b6f"
"gitHead": "bdd2e9ee95a135999f91655ebb9dde9a0310772f"
}
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