National Pest Management
Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

rehype

7.0.0 • Public • Published

rehype

Build Coverage Downloads Size Chat

rehype is an HTML processor powered by plugins part of the unified collective.

Don’t need the parser? Or the compiler? That’s OK.


Announcing the unified collective! 🎉 Read more about it on Medium »

Sponsors



🥇 ZEIT


🥇 Gatsby


🥉 Compositor


Holloway




You?

Installation

npm:

npm install rehype

Usage

var rehype = require('rehype')
var report = require('vfile-reporter')
 
rehype().process('<title>Hi</title><h2>Hello world!', function(err, file) {
  console.log(report(err || file))
  console.log(String(file))
})

Yields:

no issues found
<html><head><title>Hi</title></head><body><h2>Hello world!</h2></body></html>

Configuration for rehype-parse and rehype-stringify can be set with .data('settings', {/*...*/}).

License

MIT © Titus Wormer

install

npm i rehype

Downloadsweekly downloads

8,963

version

7.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability