1 | [![npm](https://nodei.co/npm/mdast-squeeze-paragraphs.png)](https://npmjs.com/package/mdast-squeeze-paragraphs)
|
2 |
|
3 | # mdast-squeeze-paragraphs
|
4 |
|
5 | [![Build Status][travis-badge]][travis] [![Dependency Status][david-badge]][david]
|
6 |
|
7 | Remove empty paragraphs left from other [mdast] transformations.
|
8 |
|
9 | Paragraph is considered empty if it is composed from whitespace characters.
|
10 |
|
11 | [mdast]: https://github.com/wooorm/mdast
|
12 |
|
13 | [travis]: https://travis-ci.org/eush77/mdast-squeeze-paragraphs
|
14 | [travis-badge]: https://travis-ci.org/eush77/mdast-squeeze-paragraphs.svg
|
15 | [david]: https://david-dm.org/eush77/mdast-squeeze-paragraphs
|
16 | [david-badge]: https://david-dm.org/eush77/mdast-squeeze-paragraphs.png
|
17 |
|
18 | ## Example
|
19 |
|
20 | ```js
|
21 | > mdastSqueezeParagraphs = require('mdast-squeeze-paragraphs')
|
22 |
|
23 | > mdast.use(mdastStripBadges)
|
24 | .process('![](http://img.shields.io/)\n\ntext')
|
25 | '\n\ntext\n'
|
26 |
|
27 | > mdast.use(mdastStripBadges)
|
28 | .use(mdastSqueezeParagraphs)
|
29 | .process('![](http://img.shields.io/)\n\ntext')
|
30 | 'text\n'
|
31 | ```
|
32 |
|
33 | ## API
|
34 |
|
35 | ```js
|
36 | var mdastSqueezeParagraphs = require('mdast-squeeze-paragraphs');
|
37 |
|
38 | mdast.use(mdastSqueezeParagraphs)
|
39 | ```
|
40 |
|
41 | Modifies AST in-place.
|
42 |
|
43 | ## CLI
|
44 |
|
45 | ```
|
46 | mdast -u mdast-squeeze-paragraphs
|
47 | ```
|
48 |
|
49 | ## Install
|
50 |
|
51 | ```
|
52 | npm install mdast-squeeze-paragraphs
|
53 | ```
|
54 |
|
55 | ## License
|
56 |
|
57 | MIT
|