Configure remark with comments.
Installation
npm:
npm install remark-comment-config
Usage
var commentConfig = require('remark-comment-config');
var remark = require('remark');
var file = remark().use(commentConfig).process([
'<!--remark commonmark bullet="*"-->',
'',
'1) Commonmark list (this is a parse setting)',
'',
'- List item (this is a stringification setting)',
''
].join('\n'));
console.log(String(file));
Yields:
<!--remark commonmark bullet="*"-->
1. Commonmark list (this is a parse setting)
* List item (this is a stringification setting)
API
Parses comments, such as <!--remark foo="bar" baz-->
, and passes the
“attributes” as parse and stringify.
Just like remark-yaml-config, but comments are
invisible when rendering to HTML, such as on GitHub.
License
MIT © Titus Wormer