Skip to content

Commit

Permalink
Release version 2.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
rtfpessoa committed Oct 8, 2016
1 parent 7d02e67 commit 1e22a3e
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "diff2html",
"version": "2.0.6",
"version": "2.0.7",
"homepage": "https://diff2html.xyz",
"description": "Fast Diff to colorized HTML",
"keywords": [
Expand Down
3 changes: 2 additions & 1 deletion dist/diff2html-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@

Diff2HtmlUI.prototype.draw = function(targetId, config) {
var cfg = config || {};
cfg.inputFormat = 'json';
var $target = this._getTarget(targetId);
$target.html(Diff2Html.getPrettyHtml(diffJson, cfg));

synchronisedScroll($target, config);
synchronisedScroll($target, cfg);
};

function synchronisedScroll($target, config) {
Expand Down
2 changes: 1 addition & 1 deletion dist/diff2html-ui.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion dist/diff2html.js
Original file line number Diff line number Diff line change
Expand Up @@ -2572,6 +2572,8 @@ process.umask = function() { return 0; };
var dissimilarityIndex = /^dissimilarity index (\d+)%/;
var index = /^index ([0-9a-z]+)\.\.([0-9a-z]+)\s*(\d{6})?/;

var binaryFiles = /^Binary files (.*) and (.*) differ/;

/* Combined Diff */
var combinedIndex = /^index ([0-9a-z]+),([0-9a-z]+)\.\.([0-9a-z]+)/;
var combinedMode = /^mode (\d{6}),(\d{6})\.\.(\d{6})/;
Expand Down Expand Up @@ -2701,6 +2703,10 @@ process.umask = function() { return 0; };
currentFile.newName = values[1];
}
currentFile.isRename = true;
} else if ((values = binaryFiles.exec(line))) {
currentFile.isBinary = true;
currentFile.oldName = _getFilename(null, values[1], [config.srcPrefix]);
currentFile.newName = _getFilename(null, values[2], [config.dstPrefix]);
} else if ((values = similarityIndex.exec(line))) {
currentFile.unchangedPercentage = values[1];
} else if ((values = dissimilarityIndex.exec(line))) {
Expand Down Expand Up @@ -2760,7 +2766,12 @@ process.umask = function() { return 0; };
}

function _getFilename(linePrefix, line, prefixes) {
var FilenameRegExp = new RegExp('^' + linePrefix + ' "?(.+?)"?$');
var FilenameRegExp;
if (linePrefix) {
FilenameRegExp = new RegExp('^' + linePrefix + ' "?(.+?)"?$');
} else {
FilenameRegExp = new RegExp('^"?(.+?)"?$');
}

var filename;
var values = FilenameRegExp.exec(line);
Expand Down
5 changes: 3 additions & 2 deletions dist/diff2html.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "diff2html",
"version": "2.0.6",
"version": "2.0.7",
"homepage": "https://diff2html.xyz",
"description": "Fast Diff to colorized HTML",
"keywords": [
Expand Down

0 comments on commit 1e22a3e

Please sign in to comment.