diff --git a/src/core/operations/Diff.mjs b/src/core/operations/Diff.mjs index 7adea178..921369e8 100644 --- a/src/core/operations/Diff.mjs +++ b/src/core/operations/Diff.mjs @@ -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 += "" + Utils.escapeHtml(diff[i].value) + ""; } else if (diff[i].removed) { if (showRemoved) output += "" + Utils.escapeHtml(diff[i].value) + ""; - } else { - output += Utils.escapeHtml(diff[i].value); + } else if (!showSubtraction) { + output += Utils.escapeHtml(diff[i].value) + ""; } }