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

html-to-text

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-to-text - npm Package Compare versions

Comparing version 5.1.0 to 5.1.1

4

CHANGELOG.md
# Changelog
## Version 5.1.1
* `preserveNewLines` whitespace issue fixed [#162](https://github.com/werk85/node-html-to-text/pull/162)
## Version 5.1.0

@@ -4,0 +8,0 @@

2

lib/helper.js

@@ -63,3 +63,3 @@ var zip = require('lodash/zip');

var words = preserveNewlines
? text.replace(/\n/g, '\n ').split(/\ +/)
? text.trim().replace(/\n/g, '\n ').split(/\ +/)
: text.trim().split(/\s+/);

@@ -66,0 +66,0 @@

{
"name": "html-to-text",
"version": "5.1.0",
"version": "5.1.1",
"description": "Advanced html to plain text converter",

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

@@ -556,2 +556,9 @@ /* eslint max-len: "off" */

});
it('should not add additional whitespace after <sup>', function() {
var testString = '<p>This text contains <sup>superscript</sup> text.</p>';
var options = { preserveNewlines: true };
expect(htmlToText.fromString(testString, options)).to.equal('This text contains superscript text.');
});
});

@@ -558,0 +565,0 @@

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