This commit is contained in:
Rodrigo Fernandes 2019-10-05 10:53:07 +01:00
parent 9a89f31b9c
commit 5a764deda2
No known key found for this signature in database
GPG key ID: C5DD1B4104382F6B
3 changed files with 5 additions and 4 deletions

5
dist/diff2html.js vendored
View file

@ -3516,6 +3516,7 @@ process.umask = function() { return 0; };
inputFormat: 'diff', inputFormat: 'diff',
outputFormat: 'line-by-line', outputFormat: 'line-by-line',
showFiles: false, showFiles: false,
diffStyle: 'word',
matching: 'none', matching: 'none',
matchWordsThreshold: 0.25, matchWordsThreshold: 0.25,
matchingMaxComparisons: 2500, matchingMaxComparisons: 2500,
@ -4191,7 +4192,7 @@ process.umask = function() { return 0; };
} }
var diff; var diff;
if (config.charByChar) { if (config.diffStyle === 'char') {
diff = jsDiff.diffChars(unprefixedLine1, unprefixedLine2); diff = jsDiff.diffChars(unprefixedLine1, unprefixedLine2);
} else { } else {
diff = jsDiff.diffWordsWithSpace(unprefixedLine1, unprefixedLine2); diff = jsDiff.diffWordsWithSpace(unprefixedLine1, unprefixedLine2);
@ -4200,7 +4201,7 @@ process.umask = function() { return 0; };
var highlightedLine = ''; var highlightedLine = '';
var changedWords = []; var changedWords = [];
if (!config.charByChar && config.matching === 'words') { if (config.diffStyle === 'word' && config.matching === 'words') {
var treshold = 0.25; var treshold = 0.25;
if (typeof (config.matchWordsThreshold) !== 'undefined') { if (typeof (config.matchWordsThreshold) !== 'undefined') {

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
{ {
"name": "diff2html", "name": "diff2html",
"version": "2.11.3", "version": "2.12.0",
"homepage": "https://diff2html.xyz", "homepage": "https://diff2html.xyz",
"description": "Fast Diff to colorized HTML", "description": "Fast Diff to colorized HTML",
"keywords": [ "keywords": [