|
@@ -47,6 +47,11 @@ class Diff extends Operation {
|
|
|
"type": "boolean",
|
|
|
"value": true
|
|
|
},
|
|
|
+ {
|
|
|
+ "name": "Show subtraction",
|
|
|
+ "type": "boolean",
|
|
|
+ "value": true
|
|
|
+ },
|
|
|
{
|
|
|
"name": "Ignore whitespace",
|
|
|
"type": "boolean",
|
|
@@ -67,6 +72,7 @@ class Diff extends Operation {
|
|
|
diffBy,
|
|
|
showAdded,
|
|
|
showRemoved,
|
|
|
+ showSubtraction,
|
|
|
ignoreWhitespace
|
|
|
] = args,
|
|
|
samples = input.split(sampleDelim);
|
|
@@ -116,8 +122,8 @@ class Diff extends Operation {
|
|
|
if (showAdded) output += "<span class='hl5'>" + Utils.escapeHtml(diff[i].value) + "</span>";
|
|
|
} else if (diff[i].removed) {
|
|
|
if (showRemoved) output += "<span class='hl3'>" + Utils.escapeHtml(diff[i].value) + "</span>";
|
|
|
- } else {
|
|
|
- output += Utils.escapeHtml(diff[i].value);
|
|
|
+ } else if (!showSubtraction) {
|
|
|
+ output += Utils.escapeHtml(diff[i].value) + "</span>";
|
|
|
}
|
|
|
}
|
|
|
|