JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4012505
  • Score
    100M100P100Q193598F
  • License MIT

HTML processor powered by plugins

Package Exports

  • rehype
  • rehype/package.json

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rehype) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

rehype

Build Coverage Downloads Size Sponsors Backers Chat

unified processor to parse and compile HTML. Powered by plugins. Part of the unified collective.

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

If you’re in a browser, trust the content, and value a smaller bundle size, use rehype-dom instead.

Sponsors



🥇 ZEIT


🥇 Gatsby


🥉 Compositor


Holloway




You?

Read more about the unified collective on Medium »

Install

npm:

npm install rehype

Use

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', {/*...*/}).

Contribute

See contributing.md in rehypejs/.github for ways to get started. See support.md for ways to get help. Ideas for new plugins and tools can be posted in rehypejs/ideas.

A curated list of awesome rehype resources can be found in awesome rehype.

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