Skip to content

Commit 5a764de

Browse files
committed
v2.12.0
1 parent 9a89f31 commit 5a764de

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

dist/diff2html.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3516,6 +3516,7 @@ process.umask = function() { return 0; };
35163516
inputFormat: 'diff',
35173517
outputFormat: 'line-by-line',
35183518
showFiles: false,
3519+
diffStyle: 'word',
35193520
matching: 'none',
35203521
matchWordsThreshold: 0.25,
35213522
matchingMaxComparisons: 2500,
@@ -4191,7 +4192,7 @@ process.umask = function() { return 0; };
41914192
}
41924193

41934194
var diff;
4194-
if (config.charByChar) {
4195+
if (config.diffStyle === 'char') {
41954196
diff = jsDiff.diffChars(unprefixedLine1, unprefixedLine2);
41964197
} else {
41974198
diff = jsDiff.diffWordsWithSpace(unprefixedLine1, unprefixedLine2);
@@ -4200,7 +4201,7 @@ process.umask = function() { return 0; };
42004201
var highlightedLine = '';
42014202

42024203
var changedWords = [];
4203-
if (!config.charByChar && config.matching === 'words') {
4204+
if (config.diffStyle === 'word' && config.matching === 'words') {
42044205
var treshold = 0.25;
42054206

42064207
if (typeof (config.matchWordsThreshold) !== 'undefined') {

dist/diff2html.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "diff2html",
3-
"version": "2.11.3",
3+
"version": "2.12.0",
44
"homepage": "https://diff2html.xyz",
55
"description": "Fast Diff to colorized HTML",
66
"keywords": [

0 commit comments

Comments
 (0)