mdast-squeeze-paragraphs
Remove empty paragraphs left from other mdast transformations.
Paragraph is considered empty if it is composed from whitespace characters.
Example
> mdastSqueezeParagraphs = require('mdast-squeeze-paragraphs')
> mdast.use(mdastStripBadges)
.process('![](http://img.shields.io/)\n\ntext')
'\n\ntext\n'
> mdast.use(mdastStripBadges)
.use(mdastSqueezeParagraphs)
.process('![](http://img.shields.io/)\n\ntext')
'text\n'
API
var mdastSqueezeParagraphs = require('mdast-squeeze-paragraphs');
mdast.use(mdastSqueezeParagraphs)
Modifies AST in-place.
CLI
mdast -u mdast-squeeze-paragraphs
Install
npm install mdast-squeeze-paragraphs
License
MIT