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 - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

11

index.js

@@ -6,12 +6,5 @@ 'use strict';

ast.children = ast.children.filter(function (node) {
if (node.type != 'paragraph') {
return true;
}
// Remove empty text nodes.
node.children = node.children.filter(function (node) {
return node.type != 'text' || (node.value = node.value.trim());
return node.type != 'paragraph' || node.children.some(function (node) {
return node.type != 'text' || !/^\s*$/.test(node.value);
});
return node.children.length;
});

@@ -18,0 +11,0 @@

4

package.json
{
"name": "mdast-squeeze-paragraphs",
"version": "2.1.0",
"description": "Remove empty paragraphs and whitespace left from other mdast transformations",
"version": "2.1.1",
"description": "Remove empty paragraphs left from other mdast transformations",
"author": "Eugene Sharygin <eush77@gmail.com>",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -7,3 +7,3 @@ [![npm](https://nodei.co/npm/mdast-squeeze-paragraphs.png)](https://npmjs.com/package/mdast-squeeze-paragraphs)

Remove empty paragraphs and whitespace left from other [mdast] transformations.
Remove empty paragraphs left from other [mdast] transformations.

@@ -10,0 +10,0 @@ Paragraph is considered empty if it is composed from whitespace characters.

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