unified

Project: remarkjs/remark-strip-badges

Package: remark-strip-badges@4.0.0

  1. Dependencies: 3·Dependents: 5
  2. remark plugin to remove badges (such as shields.io)
  1. remark 185
  2. unified 145
  3. plugin 128
  4. markdown 109
  5. remark-plugin 71
  6. mdast 71
  7. remove 10
  8. clean 6
  9. strip 2

remark-strip-badges

Build Coverage Downloads Size Sponsors Backers Chat

remark plugin to strip badges (such as shields.io).

Install

npm:

npm install remark-strip-badges

Use

Say we have the following file, example.md:

# remark-strip-badges ![Build Status][badge]

[badge]: https://img.shields.io/travis/remarkjs/remark-strip-badges.svg

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

var fs = require('fs')
var remark = require('remark')
var strip = require('remark-strip-badges')

remark()
  .use(strip)
  .process(fs.readFileSync('example.md'), function(err, file) {
    if (err) throw err
    console.log(String(file))
  })

Now, running node example yields:

# remark-strip-badges

[badge]: https://img.shields.io/travis/remarkjs/remark-strip-badges.svg

API

remark.use(stripBadges)

Plugin to strip badges (such as shields.io).

Security

Use of remark-strip-badges does not involve rehype (hast) or user content so there are no openings for cross-site scripting (XSS) attacks.

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