remark-comments
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -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 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7511
87