unified

Project:remarkjs/remark-strip-badges

Package:remark-strip-badges@3.1.0

  1. Dependencies:3·Dependents:5
  2. remark plugin to remove badges (such as shields.io)
  1. remark 165
  2. unified 132
  3. plugin 88
  4. markdown 82
  5. mdast 68
  6. remove 10
  7. clean 6
  8. 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).

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, organisation, or community you agree to abide by its terms.

License

MIT © Titus Wormer