Projects STRLCPY kitsec-core Files
🤬
..
index.js Loading last commit info...
license
package.json
readme.md
readme.md

remark-squeeze-paragraphs

[Build]build [Coverage]coverage [Downloads]downloads [Size]size [Sponsors]collective [Backers]collective [Chat]chat

remark plugin to remove empty (or whitespace only) paragraphs.

Install

npm:

npm install remark-squeeze-paragraphs

Use

var remark = require('remark')
var stripBadges = require('remark-strip-badges')
var squeezeParagraphs = require('remark-squeeze-paragraphs')

remark()
  .use(stripBadges)
  .processSync('![](https://img.shields.io/)\n\ntext')
  .toString()
// => "\n\ntext\n"

remark()
  .use(stripBadges)
  .use(squeezeParagraphs)
  .processSync('![](https://img.shields.io/)\n\ntext')
  .toString()
// => "text\n"

API

remark().use(squeezeParagraphs)

Remove empty (or white-space only) paragraphs.

Security

Use of remark-squeeze-paragraphs does not involve rehype (hast) or user content so there are no openings for cross-site scripting (XSS) attacks.

Contribute

See contributing.md in remarkjs/.github for ways to get started. See support.md for ways to get help.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

License

MIT © Eugene Sharygin

Please wait...
Page is in error, reload to recover