diff2html
Advanced tools
Comparing version 0.2.2 to 0.2.3
{ | ||
"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); |
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
49808
1154