html-to-text
Advanced tools
Comparing version 5.1.0 to 5.1.1
# 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 @@ |
@@ -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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
89842
1157
0