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

diff2html

Package Overview
Dependencies
Maintainers
1
Versions
208
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diff2html - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

2

package.json
{
"name": "diff2html",
"version": "0.2.2",
"version": "0.2.3",

@@ -5,0 +5,0 @@ "homepage": "https://www.github.com/rtfpessoa/diff2html-nodejs",

@@ -75,3 +75,2 @@ /*

var oldLine, newLine;
var oldEscapedLine, newEscapedLine;

@@ -82,7 +81,5 @@ if (oldLines.length === newLines.length) {

newLine = newLines[j];
oldEscapedLine = utils.escape(oldLine.content);
newEscapedLine = utils.escape(newLine.content);
config.isCombined = file.isCombined;
var diff = printerUtils.diffHighlight(oldEscapedLine, newEscapedLine, config);
var diff = printerUtils.diffHighlight(oldLine.content, newLine.content, config);

@@ -89,0 +86,0 @@ processedOldLines += generateLineHtml(oldLine.type, oldLine.oldNumber, oldLine.newNumber, diff.first.line, diff.first.prefix);

@@ -12,2 +12,3 @@ /*

var jsDiff = (typeof JsDiff !== "undefined" && JsDiff) || require("../lib/diff.js");
var utils = require("./utils.js").Utils;

@@ -55,5 +56,6 @@ function PrinterUtils() {

var elemType = part.added ? 'ins' : part.removed ? 'del' : null;
var escapedValue = utils.escape(part.value);
if (elemType !== null) highlightedLine += "<" + elemType + ">" + part.value + "</" + elemType + ">";
else highlightedLine += part.value;
if (elemType !== null) highlightedLine += "<" + elemType + ">" + escapedValue + "</" + elemType + ">";
else highlightedLine += escapedValue;
});

@@ -60,0 +62,0 @@

@@ -99,3 +99,2 @@ /*

var oldLine, newLine;
var oldEscapedLine, newEscapedLine;

@@ -106,8 +105,6 @@ if (oldLines.length === newLines.length) {

newLine = newLines[j];
oldEscapedLine = utils.escape(oldLine.content);
newEscapedLine = utils.escape(newLine.content);
config.isCombined = file.isCombined;
var diff = printerUtils.diffHighlight(oldEscapedLine, newEscapedLine, config);
var diff = printerUtils.diffHighlight(oldLine.content, newLine.content, config);

@@ -114,0 +111,0 @@ fileHtml.left += generateSingleLineHtml(oldLine.type, oldLine.oldNumber, diff.first.line, diff.first.prefix);

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