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

tm-content-parser

Package Overview
Dependencies
Maintainers
10
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tm-content-parser - npm Package Compare versions

Comparing version 1.0.12 to 1.0.13

3

index.js

@@ -201,2 +201,3 @@ "use strict";

replaceEntityTags,
removeNewlinesFromLists,
replaceNewLineCharacters,

@@ -227,2 +228,4 @@ formatHtml

const removeNewlinesFromLists = R.replace(/\/li>([^<]+)<li>/g, '\/li><li>');
const replaceNewLineCharacters = R.replace(/\n/g, '<br>');

@@ -229,0 +232,0 @@

6

package.json
{
"name": "tm-content-parser",
"version": "1.0.12",
"version": "1.0.13",
"description": "Trinity Mirror Content Type Parser",

@@ -31,3 +31,3 @@ "main": "index.js",

],
"dependencies":{
"dependencies": {
"cheerio": "0.22.0",

@@ -49,3 +49,3 @@ "co": "4.6.0",

},
"tmAppsNode":"6.10.3"
"tmAppsNode": "6.10.3"
}

@@ -107,2 +107,16 @@ "use strict";

describe('.removeNewlinesFromLists', () => {
const removeNewlinesFromLists = contentTypeParser.__get__("removeNewlinesFromLists");
it('should replace new line characters with correct html tags', () => {
removeNewlinesFromLists(
'<p>This is a paragraph with \n new \n lines \n <ul><li>Coffee</li>\n<li>Tea</li>\n<li>Milk</li></ul></p>'
).should.eql(
'<p>This is a paragraph with \n new \n lines \n <ul><li>Coffee</li><li>Tea</li><li>Milk</li></ul></p>'
);
});
});
describe('.replaceNewLineCharacters', () => {

@@ -109,0 +123,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