Release version 2.0.7
This commit is contained in:
parent
7d02e67f3b
commit
1e22a3ec8f
6 changed files with 20 additions and 7 deletions
|
|
@ -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": [
|
||||
|
|
|
|||
3
dist/diff2html-ui.js
vendored
3
dist/diff2html-ui.js
vendored
|
|
@ -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) {
|
||||
|
|
|
|||
2
dist/diff2html-ui.min.js
vendored
2
dist/diff2html-ui.min.js
vendored
File diff suppressed because one or more lines are too long
13
dist/diff2html.js
vendored
13
dist/diff2html.js
vendored
|
|
@ -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})/;
|
||||
|
|
@ -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))) {
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
5
dist/diff2html.min.js
vendored
5
dist/diff2html.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -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": [
|
||||
|
|
|
|||
Loading…
Reference in a new issue