remark-comment-config
remark plugin to configure it with comments
Last updated 2 months ago by wooorm .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install remark-comment-config 
SYNC missed versions from official npm registry.

remark-comment-config

Build Coverage Downloads Size Sponsors Backers Chat

remark plugin to configure it with comments.

Important!

This plugin is affected by the new parser in remark (micromark, see remarkjs/remark#536). Use version 5 while you’re still on remark 12. Use version 6 for remark 13+.

Install

npm:

npm install remark-comment-config

Use

Say we have the following file, example.md:

<!--remark bullet="+"-->

- List item (this is a stringify setting)

And our script, example.js, looks as follows:

var vfile = require('to-vfile')
var remark = require('remark')
var commentConfig = require('remark-comment-config')

remark()
  .use(commentConfig)
  .process(vfile.readSync('example.md'), function (err, file) {
    if (err) throw err
    console.log(String(file))
  })

Now, running node example yields:

<!--remark bullet="+"-->

+   List item (this is a stringify setting)

API

remark().use(commentConfig)

Plugin to configure remark with comments. Parses comments, such as <!--remark foo="bar" baz-->, and passes the “attributes” as remark-stringify.

This is essentially the same as remark-yaml-config, except that comments are invisible when rendering to HTML (such as on GitHub).

Security

Use of remark-comment-config can change how Markdown is compiled. If the Markdown is user provided, this may open you up to a cross-site scripting (XSS) attack.

Related

Contribute

See contributing.md in remarkjs/.github for ways to get started. See support.md for ways to get help.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

License

MIT © Titus Wormer

Current Tags

  • 6.0.0                                ...           latest (2 months ago)
  • 4.0.0-alpha.1                                ...           next (4 years ago)

16 Versions

  • 6.0.0                                ...           2 months ago
  • 5.1.1                                ...           8 months ago
  • 5.1.0                                ...           a year ago
  • 5.0.3                                ...           2 years ago
  • 5.0.2                                ...           3 years ago
  • 5.0.1                                ...           3 years ago
  • 5.0.0                                ...           4 years ago
  • 4.0.2                                ...           4 years ago
  • 4.0.1                                ...           4 years ago
  • 4.0.0                                ...           4 years ago
  • 4.0.0-alpha.1                                ...           4 years ago
  • 3.0.0                                ...           5 years ago
  • 3.0.0-alpha.1                                ...           5 years ago
  • 2.0.2                                ...           5 years ago
  • 2.0.1                                ...           5 years ago
  • 2.0.0                                ...           5 years ago

Copyright 2014 - 2016 © taobao.org |