Skip to content

Commit 7aeb70b

Browse files
committed
Prepare for beta 10 release
1 parent 0950d2b commit 7aeb70b

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

bower.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.0.0-beta9",
3+
"version": "2.0.0-beta10",
44
"homepage": "http://rtfpessoa.github.io/diff2html/",
55
"description": "Fast Diff to colorized HTML",
66
"keywords": [

dist/diff2html.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,7 +2199,10 @@
21992199
var insertType;
22002200
var deleteType;
22012201

2202-
var doMatching = that.config.matching === 'lines' || that.config.matching === 'words';
2202+
var comparisons = oldLines.length * newLines.length;
2203+
var maxComparisons = that.config.matchingMaxComparisons || 2500;
2204+
var doMatching = comparisons < maxComparisons && (that.config.matching === 'lines' ||
2205+
that.config.matching === 'words');
22032206

22042207
if (doMatching) {
22052208
matches = matcher(oldLines, newLines);
@@ -5411,7 +5414,11 @@
54115414
var matches;
54125415
var insertType;
54135416
var deleteType;
5414-
var doMatching = that.config.matching === 'lines' || that.config.matching === 'words';
5417+
5418+
var comparisons = oldLines.length * newLines.length;
5419+
var maxComparisons = that.config.matchingMaxComparisons || 2500;
5420+
var doMatching = comparisons < maxComparisons && (that.config.matching === 'lines' ||
5421+
that.config.matching === 'words');
54155422

54165423
if (doMatching) {
54175424
matches = matcher(oldLines, newLines);

dist/diff2html.min.js

Lines changed: 2 additions & 2 deletions
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.0.0-beta9",
3+
"version": "2.0.0-beta10",
44
"homepage": "http://rtfpessoa.github.io/diff2html/",
55
"description": "Fast Diff to colorized HTML",
66
"keywords": [

0 commit comments

Comments
 (0)