unified

Project: remarkjs/strip-markdown

Package: strip-markdown@3.1.2

  1. Dependencies: 0·Dependents: 37
  2. remark plugin to remove Markdown formatting
  1. remark 188
  2. unified 146
  3. plugin 130
  4. markdown 110
  5. mdast 72
  6. remark-plugin 71
  7. text 17
  8. plain 4

strip-markdown

Build Coverage Downloads Size Sponsors Backers Chat

remark plugin remove Markdown formatting. This essentially removes everything but paragraphs and text nodes.

This is one of the first remark plugins, before prefixing with remark- got cool.

Install

npm:

npm install strip-markdown

Use

var remark = require('remark')
var strip = require('strip-markdown')

remark()
  .use(strip)
  .process('Some *emphasis*, **importance**, and `code`.', function(err, file) {
    if (err) throw err
    console.log(String(file))
  })

Yields:

Some emphasis, importance, and code.

API

remark().use(strip)

Plugin remove Markdown formatting.

Security

Use of strip-markdown 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