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

remark-comments

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-comments - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

15

dist/index.js

@@ -5,9 +5,8 @@ 'use strict';

var marker = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'COMMENTS';
return '<--' + marker;
return '<--' + marker + ' ';
};
var endMarkerFactory = function endMarkerFactory() {
var marker = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'COMMENTS';
return marker + '-->';
return ' ' + marker + '-->';
};
var SPACE = ' ';

@@ -36,7 +35,7 @@ function plugin() {

var comment = value.substring(beginMarker.length + 1, keepEnd - 1);
return eat(beginMarker + SPACE + comment + SPACE + endMarker)({
var comment = value.substring(beginMarker.length, keepEnd);
return eat(beginMarker + comment + endMarker)({
type: 'comments',
data: { comment: comment },
value: ''
value: '',
data: { comment: comment }
});

@@ -59,3 +58,3 @@ }

visitors.comments = function (node) {
return beginMarker + SPACE + node.data.comment + SPACE + endMarker;
return beginMarker + node.data.comment + endMarker;
};

@@ -62,0 +61,0 @@ }

{
"name": "remark-comments",
"version": "1.1.0",
"version": "1.2.0",
"repository": {

@@ -37,3 +37,3 @@ "url": "https://github.com/zestedesavoir/zmarkdown/tree/master/packages/remark-comments",

"babel-jest": "^22.0.4",
"babel-preset-es2015": "^6.24.1",
"babel-preset-env": "^1.6.1",
"cross-env": "^5.0.5",

@@ -40,0 +40,0 @@ "dedent": "^0.7.0",

@@ -1,4 +0,3 @@

const beginMarkerFactory = (marker = 'COMMENTS') => `<--${marker}`
const endMarkerFactory = (marker = 'COMMENTS') => `${marker}-->`
const SPACE = ' '
const beginMarkerFactory = (marker = 'COMMENTS') => `<--${marker} `
const endMarkerFactory = (marker = 'COMMENTS') => ` ${marker}-->`

@@ -21,7 +20,7 @@ function plugin ({beginMarker = 'COMMENTS', endMarker = 'COMMENTS'} = {}) {

const comment = value.substring(beginMarker.length + 1, keepEnd - 1)
return eat(beginMarker + SPACE + comment + SPACE + endMarker)({
const comment = value.substring(beginMarker.length, keepEnd)
return eat(beginMarker + comment + endMarker)({
type: 'comments',
value: '',
data: {comment},
value: '',
})

@@ -44,3 +43,3 @@ }

visitors.comments = (node) => {
return beginMarker + SPACE + node.data.comment + SPACE + endMarker
return beginMarker + node.data.comment + endMarker
}

@@ -47,0 +46,0 @@ }

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