Set remark options with comments during
runtime.
Installation
npm
npm install remark-comment-config
remark-comment-config is also available for duo,
and as an AMD, CommonJS, and globals module, uncompressed and
compressed.
Table of Contents
Usage
var commentConfig = require('remark-comment-config');
var remark = require('remark').use(commentConfig);
Document:
var input = [
'<!--remark commonmark bullet="*"-->',
'',
'1) Commonmark list (this is a parse setting)',
'',
'- List item (this is a stringification setting)',
''
].join('\n');
Process:
var doc = remark.process(input);
Yields:
<!--remark commonmark bullet="*"-->
1. Commonmark list (this is a parse setting)
* List item (this is a stringification setting)
CLI
remark --use comment-config
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.
Signatures
remark = remark.use(commentConfig, options?)
.
Parameters
commentConfig
— This plugin.
Returns
Object
, see remark.use(plugin)
.
License
MIT © Titus Wormer