Release 2.10.0
This commit is contained in:
parent
0e1a908207
commit
defd8f399b
4 changed files with 23 additions and 9 deletions
26
dist/diff2html.js
vendored
26
dist/diff2html.js
vendored
|
|
@ -3518,6 +3518,7 @@ process.umask = function() { return 0; };
|
|||
matching: 'none',
|
||||
matchWordsThreshold: 0.25,
|
||||
matchingMaxComparisons: 2500,
|
||||
maxLineSizeInBlockForComparison: 200,
|
||||
maxLineLengthHighlight: 10000,
|
||||
renderNothingWhenEmpty: false
|
||||
};
|
||||
|
|
@ -3881,9 +3882,17 @@ process.umask = function() { return 0; };
|
|||
var deleteType;
|
||||
|
||||
var comparisons = oldLines.length * newLines.length;
|
||||
var maxComparisons = that.config.matchingMaxComparisons || 2500;
|
||||
var doMatching = comparisons < maxComparisons && (that.config.matching === 'lines' ||
|
||||
that.config.matching === 'words');
|
||||
|
||||
var maxLineSizeInBlock = Math.max.apply(null,
|
||||
[0].concat((oldLines.concat(newLines)).map(
|
||||
function(elem) {
|
||||
return elem.content.length;
|
||||
}
|
||||
)));
|
||||
|
||||
var doMatching = comparisons < that.config.matchingMaxComparisons &&
|
||||
maxLineSizeInBlock < that.config.maxLineSizeInBlockForComparison &&
|
||||
(that.config.matching === 'lines' || that.config.matching === 'words');
|
||||
|
||||
if (doMatching) {
|
||||
matches = matcher(oldLines, newLines);
|
||||
|
|
@ -4505,9 +4514,14 @@ process.umask = function() { return 0; };
|
|||
var deleteType;
|
||||
|
||||
var comparisons = oldLines.length * newLines.length;
|
||||
var maxComparisons = that.config.matchingMaxComparisons || 2500;
|
||||
var doMatching = comparisons < maxComparisons && (that.config.matching === 'lines' ||
|
||||
that.config.matching === 'words');
|
||||
|
||||
var maxLineSizeInBlock = Math.max.apply(null, (oldLines.concat(newLines)).map(function(elem) {
|
||||
return elem.length;
|
||||
}));
|
||||
|
||||
var doMatching = comparisons < that.config.matchingMaxComparisons &&
|
||||
maxLineSizeInBlock < that.config.maxLineSizeInBlockForComparison &&
|
||||
(that.config.matching === 'lines' || that.config.matching === 'words');
|
||||
|
||||
if (doMatching) {
|
||||
matches = matcher(oldLines, newLines);
|
||||
|
|
|
|||
2
dist/diff2html.min.js
vendored
2
dist/diff2html.min.js
vendored
File diff suppressed because one or more lines are too long
2
docs/demo.min.js
vendored
2
docs/demo.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "diff2html",
|
||||
"version": "2.9.0",
|
||||
"version": "2.10.0",
|
||||
"homepage": "https://diff2html.xyz",
|
||||
"description": "Fast Diff to colorized HTML",
|
||||
"keywords": [
|
||||
|
|
|
|||
Loading…
Reference in a new issue