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

clean-html

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clean-html - npm Package Compare versions

Comparing version 1.3.3 to 1.3.4

11

cmd.js

@@ -18,2 +18,3 @@ #!/usr/bin/env node

'replace-nbsp': getOptAsBool(argv['replace-nbsp']),
'wrap': getOptAsInt(argv['wrap']),
'add-break-around-tags': getOptAsArray(argv['add-break-around-tags']),

@@ -48,2 +49,12 @@ 'add-remove-attributes': getOptAsArray(argv['add-remove-attributes']),

function getOptAsInt(opt) {
if (opt === undefined) {
return undefined;
}
var val = parseInt(opt);
return isNaN(val) ? undefined : val;
}
function read(filename, callback) {

@@ -50,0 +61,0 @@ if (filename) {

12

index.js

@@ -90,3 +90,3 @@ var htmlparser = require('htmlparser2'),

options['replace-nbsp'] = opt['replace-nbsp'] === true ? true : false;
options['wrap'] = opt['wrap'] || options['wrap'];
options['wrap'] = opt['wrap'] >= 0 ? opt['wrap'] : options['wrap'];

@@ -258,2 +258,10 @@ if (opt['add-break-around-tags']) {

if (bound == -1) {
bound = line.indexOf(' ', options['wrap']);
if (bound == -1) {
return line;
}
}
var line1 = line.substr(0, bound),

@@ -300,3 +308,3 @@ line2 = indent + line.substr(bound + 1);

if (line.length > options['wrap']) {
if (options['wrap'] && line.length > options['wrap']) {
line = wrap(line, indent);

@@ -303,0 +311,0 @@ }

2

package.json
{
"name": "clean-html",
"version": "1.3.3",
"version": "1.3.4",
"description": "HTML cleaner and beautifier",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -153,3 +153,3 @@ ## HTML cleaner and beautifier

The column number where lines should wrap.
The column number where lines should wrap. Set to 0 to disable line wrapping.

@@ -156,0 +156,0 @@ Type: Integer

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