Set remark options with comments during runtime.
Installation
npm:
npm install remark-comment-config
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 doc = 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:
console.log('markdown', doc);
API
Parses comments, such as <!--remark foo="bar" baz-->
, and passes the
“attributes” as settings
to remark.
Just like remark-yaml-config,
but comments are invisible when rendering to HTML, such as on GitHub.
License
MIT © Titus Wormer