Configure remark with comments.
Installation
npm:
npm install remark-parse
remark-comment-config is also available as an AMD, CommonJS, and
globals module, uncompressed and compressed.
Usage
Dependencies:
var commentConfig = require('remark-comment-config');
var remark = require('remark');
Process:
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'));
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