Release 2.10.0

This commit is contained in:
Rodrigo Fernandes 2019-06-20 22:09:03 +01:00
parent 0e1a908207
commit defd8f399b
No known key found for this signature in database
GPG key ID: C5DD1B4104382F6B
4 changed files with 23 additions and 9 deletions

26
dist/diff2html.js vendored
View file

@ -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);

File diff suppressed because one or more lines are too long

2
docs/demo.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -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": [