Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/noblesamurai/rehype-plaintext

Output plain text from rehype.
https://github.com/noblesamurai/rehype-plaintext

Last synced: about 1 month ago
JSON representation

Output plain text from rehype.

Awesome Lists containing this project

README

        

# rehype-plaintext

Output plain text from rehype.

[![build status](https://secure.travis-ci.org/noblesamurai/rehype-plaintext.png)](http://travis-ci.org/noblesamurai/rehype-plaintext)

## Installation

This module is installed via npm:

``` bash
$ npm install rehype-plaintext
```

## Example Usage

``` js
var rehypePlaintext = require('rehype-plaintext'),
unified = require('unified'),
parseHTML = require('rehype-parse'),
expect = require('expect.js');

unified()
.use(parseHTML)
.use(rehypePlaintext)
.process('

Hi there my friend I hope you are well.

', function(err, result) {
expect(result.toString()).to.equal('Hi there my friend I hope you are well.');
});
```

# Acknowledgements
With thanks to https://gist.github.com/blahah/bb8ee2c7695180f425f443f88fa16b79