Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mdast-squeeze-paragraphs

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdast-squeeze-paragraphs

Remove empty paragraphs and whitespace left from other mdast transformations

  • 2.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.3M
decreased by-8.27%
Maintainers
1
Weekly downloads
 
Created
Source

npm

mdast-squeeze-paragraphs

Build Status Dependency Status

Remove empty paragraphs and whitespace left from other mdast transformations.

Paragraph is considered empty if it is composed from whitespace characters.

This module provides both AST transformation and a plugin.

Example

> mdastSqueezeParagraphs = require('mdast-squeeze-paragraphs/plugin')

> 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

mdastSqueezeParagraphs(ast)

Remove empty paragraphs from the AST. Return the reference to the AST for convenience.

mdast.use(require('mdast-squeeze-paragraphs/plugin'))

Use this transformation as a plugin.

Install

npm install mdast-squeeze-paragraphs

License

MIT

Keywords

FAQs

Package last updated on 22 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc