prepare release 1.1.2
This commit is contained in:
parent
d88ff360df
commit
2acee773fb
5 changed files with 45 additions and 34 deletions
8
dist/diff2html.css
vendored
8
dist/diff2html.css
vendored
|
|
@ -33,6 +33,10 @@
|
|||
}
|
||||
|
||||
.d2h-lines-added {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.d2h-lines-added > * {
|
||||
background-color: #ceffce;
|
||||
border: 1px solid #b4e2b4;
|
||||
color: #399839;
|
||||
|
|
@ -42,6 +46,10 @@
|
|||
}
|
||||
|
||||
.d2h-lines-deleted {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.d2h-lines-deleted > * {
|
||||
background-color: #f7c8c8;
|
||||
border: 1px solid #e9aeae;
|
||||
color: #c33;
|
||||
|
|
|
|||
65
dist/diff2html.js
vendored
65
dist/diff2html.js
vendored
|
|
@ -282,6 +282,29 @@
|
|||
};
|
||||
|
||||
var diffLines = diffInput.split('\n');
|
||||
|
||||
/* Diff */
|
||||
var oldMode = /^old mode (\d{6})/;
|
||||
var newMode = /^new mode (\d{6})/;
|
||||
var deletedFileMode = /^deleted file mode (\d{6})/;
|
||||
var newFileMode = /^new file mode (\d{6})/;
|
||||
|
||||
var copyFrom = /^copy from (.+)/;
|
||||
var copyTo = /^copy to (.+)/;
|
||||
|
||||
var renameFrom = /^rename from (.+)/;
|
||||
var renameTo = /^rename to (.+)/;
|
||||
|
||||
var similarityIndex = /^similarity index (\d+)%/;
|
||||
var dissimilarityIndex = /^dissimilarity index (\d+)%/;
|
||||
var index = /^index ([0-9a-z]+)..([0-9a-z]+) (\d{6})?/;
|
||||
|
||||
/* Combined Diff */
|
||||
var combinedIndex = /^index ([0-9a-z]+),([0-9a-z]+)..([0-9a-z]+)/;
|
||||
var combinedMode = /^mode (\d{6}),(\d{6})..(\d{6})/;
|
||||
var combinedNewFile = /^new file mode (\d{6})/;
|
||||
var combinedDeletedFile = /^deleted file mode (\d{6}),(\d{6})/;
|
||||
|
||||
diffLines.forEach(function(line) {
|
||||
// Unmerged paths, and possibly other non-diffable files
|
||||
// https://github.com/scottgonzalez/pretty-diff/issues/11
|
||||
|
|
@ -290,28 +313,6 @@
|
|||
return;
|
||||
}
|
||||
|
||||
/* Diff */
|
||||
var oldMode = /^old mode (\d{6})/;
|
||||
var newMode = /^new mode (\d{6})/;
|
||||
var deletedFileMode = /^deleted file mode (\d{6})/;
|
||||
var newFileMode = /^new file mode (\d{6})/;
|
||||
|
||||
var copyFrom = /^copy from (.+)/;
|
||||
var copyTo = /^copy to (.+)/;
|
||||
|
||||
var renameFrom = /^rename from (.+)/;
|
||||
var renameTo = /^rename to (.+)/;
|
||||
|
||||
var similarityIndex = /^similarity index (\d+)%/;
|
||||
var dissimilarityIndex = /^dissimilarity index (\d+)%/;
|
||||
var index = /^index ([0-9a-z]+)..([0-9a-z]+) (\d{6})?/;
|
||||
|
||||
/* Combined Diff */
|
||||
var combinedIndex = /^index ([0-9a-z]+),([0-9a-z]+)..([0-9a-z]+)/;
|
||||
var combinedMode = /^mode (\d{6}),(\d{6})..(\d{6})/;
|
||||
var combinedNewFile = /^new file mode (\d{6})/;
|
||||
var combinedDeletedFile = /^deleted file mode (\d{6}),(\d{6})/;
|
||||
|
||||
var values = [];
|
||||
if (utils.startsWith(line, 'diff')) {
|
||||
startFile();
|
||||
|
|
@ -465,19 +466,21 @@
|
|||
' <a id="' + hideId + '" class="d2h-hide" href="#' + hideId + '">+</a>\n' +
|
||||
' <a id="' + showId + 'd2h-show" class="d2h-show" href="#' + showId + '">-</a>\n' +
|
||||
' <div class="d2h-clear"></div>\n' +
|
||||
' <div class="d2h-file-list">\n' +
|
||||
' <table class="d2h-file-list">\n' +
|
||||
|
||||
|
||||
diffFiles.map(function (file) {
|
||||
return ' <div class="d2h-file-list-line">\n' +
|
||||
' <div class="d2h-file-stats">\n' +
|
||||
' <span class="d2h-lines-added">+' + file.addedLines + '</span>\n' +
|
||||
' <span class="d2h-lines-deleted">-' + file.deletedLines + '</span>\n' +
|
||||
' </div>\n' +
|
||||
' <div class="d2h-file-name"><a href="#' + printerUtils.getHtmlId(file) + '"> ' + printerUtils.getDiffName(file) + '</a></div>\n' +
|
||||
' </div>\n'
|
||||
return ' <tr class="d2h-file-list-line">\n' +
|
||||
' <td class="d2h-lines-added">\n' +
|
||||
' <span>+' + file.addedLines + '</span>\n' +
|
||||
' </td>\n' +
|
||||
' <td class="d2h-lines-deleted">\n' +
|
||||
' <span>-' + file.deletedLines + '</span>\n' +
|
||||
' </td>\n' +
|
||||
' <td class="d2h-file-name"><a href="#' + printerUtils.getHtmlId(file) + '"> ' + printerUtils.getDiffName(file) + '</a></td>\n' +
|
||||
' </tr>\n'
|
||||
}).join('\n') +
|
||||
'</div></div>\n';
|
||||
'</table></div>\n';
|
||||
};
|
||||
|
||||
module.exports['FileListPrinter'] = new FileListPrinter();
|
||||
|
|
|
|||
2
dist/diff2html.min.css
vendored
2
dist/diff2html.min.css
vendored
|
|
@ -1 +1 @@
|
|||
.d2h-wrapper{display:block;margin:0 auto;text-align:left;width:100%}.d2h-file-wrapper{border:1px solid #ddd;border-radius:3px;margin-bottom:1em}.d2h-file-header{padding:5px 10px;border-bottom:1px solid #d8d8d8;background-color:#f7f7f7;font:13px Helvetica,arial,freesans,clean,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"}.d2h-file-stats{display:inline;font-size:12px;text-align:center;max-width:15%}.d2h-lines-added{background-color:#ceffce;border:1px solid #b4e2b4;color:#399839;border-radius:5px 0 0 5px;padding:2px;width:25px}.d2h-lines-deleted{background-color:#f7c8c8;border:1px solid #e9aeae;color:#c33;border-radius:0 5px 5px 0;padding:2px;width:25px}.d2h-file-name{display:inline;height:33px;line-height:33px;max-width:80%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.d2h-diff-table{border-collapse:collapse;font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;height:18px;line-height:18px;width:100%}.d2h-files-diff{width:100%}.d2h-file-diff{overflow-x:scroll;overflow-y:hidden}.d2h-file-side-diff{display:inline-block;overflow-x:scroll;overflow-y:hidden;width:50%;margin-right:-4px}.d2h-code-line{display:block;white-space:pre;padding:0 10px;height:18px;line-height:18px;margin-left:80px;color:inherit;overflow-x:inherit;background:none}.d2h-code-side-line{display:block;white-space:pre;padding:0 10px;height:18px;line-height:18px;margin-left:50px;color:inherit;overflow-x:inherit;background:none}.d2h-code-line del,.d2h-code-side-line del{display:inline-block;margin-top:-1px;text-decoration:none;background-color:#ffb6ba;border-radius:.2em}.d2h-code-line ins,.d2h-code-side-line ins{display:inline-block;margin-top:-1px;text-decoration:none;background-color:#97f295;border-radius:.2em}.d2h-code-line-prefix{float:left;background:none;padding:0}.d2h-code-line-ctn{background:none;padding:0}.line-num1{display:inline-block;float:left;width:30px;overflow:hidden;text-overflow:ellipsis}.line-num2{display:inline-block;float:right;width:30px;overflow:hidden;text-overflow:ellipsis}.d2h-code-linenumber{position:absolute;width:2%;min-width:65px;padding-left:10px;padding-right:10px;height:18px;line-height:18px;background-color:#fff;color:rgba(0,0,0,0.3);text-align:right;border:solid #eeeeee;border-width:0 1px 0 1px;cursor:pointer}.d2h-code-side-linenumber{position:absolute;width:35px;padding-left:10px;padding-right:10px;height:18px;line-height:18px;background-color:#fff;color:rgba(0,0,0,0.3);text-align:right;border:solid #eeeeee;border-width:0 1px 0 1px;cursor:pointer;overflow:hidden;text-overflow:ellipsis}.d2h-del{background-color:#fee8e9;border-color:#e9aeae}.d2h-ins{background-color:#dfd;border-color:#b4e2b4}.d2h-info{background-color:#f8fafd;color:rgba(0,0,0,0.3);border-color:#d5e4f2}.d2h-file-list-wrapper{margin-bottom:10px;padding:0 10px}.d2h-file-list-wrapper a{text-decoration:none;color:#3572b0}.d2h-file-list-wrapper a:visited{color:#3572b0}.d2h-file-list-header{font-weight:bold;margin-bottom:5px;text-align:left;display:inline;float:left}.d2h-file-list-line{text-align:left;font:13px Helvetica,arial,freesans,clean,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"}.d2h-file-list-line .d2h-file-name{line-height:21px}.d2h-file-list{display:none}.d2h-clear{display:block;clear:both}.d2h-show{display:none;float:left}.d2h-hide{float:left}.d2h-hide:target+.d2h-show{display:inline}.d2h-hide:target{display:none}.d2h-hide:target~.d2h-file-list{display:block}
|
||||
.d2h-wrapper{display:block;margin:0 auto;text-align:left;width:100%}.d2h-file-wrapper{border:1px solid #ddd;border-radius:3px;margin-bottom:1em}.d2h-file-header{padding:5px 10px;border-bottom:1px solid #d8d8d8;background-color:#f7f7f7;font:13px Helvetica,arial,freesans,clean,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"}.d2h-file-stats{display:inline;font-size:12px;text-align:center;max-width:15%}.d2h-lines-added{text-align:right}.d2h-lines-added>*{background-color:#ceffce;border:1px solid #b4e2b4;color:#399839;border-radius:5px 0 0 5px;padding:2px;width:25px}.d2h-lines-deleted{text-align:left}.d2h-lines-deleted>*{background-color:#f7c8c8;border:1px solid #e9aeae;color:#c33;border-radius:0 5px 5px 0;padding:2px;width:25px}.d2h-file-name{display:inline;height:33px;line-height:33px;max-width:80%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.d2h-diff-table{border-collapse:collapse;font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;height:18px;line-height:18px;width:100%}.d2h-files-diff{width:100%}.d2h-file-diff{overflow-x:scroll;overflow-y:hidden}.d2h-file-side-diff{display:inline-block;overflow-x:scroll;overflow-y:hidden;width:50%;margin-right:-4px}.d2h-code-line{display:block;white-space:pre;padding:0 10px;height:18px;line-height:18px;margin-left:80px;color:inherit;overflow-x:inherit;background:none}.d2h-code-side-line{display:block;white-space:pre;padding:0 10px;height:18px;line-height:18px;margin-left:50px;color:inherit;overflow-x:inherit;background:none}.d2h-code-line del,.d2h-code-side-line del{display:inline-block;margin-top:-1px;text-decoration:none;background-color:#ffb6ba;border-radius:.2em}.d2h-code-line ins,.d2h-code-side-line ins{display:inline-block;margin-top:-1px;text-decoration:none;background-color:#97f295;border-radius:.2em}.d2h-code-line-prefix{float:left;background:none;padding:0}.d2h-code-line-ctn{background:none;padding:0}.line-num1{display:inline-block;float:left;width:30px;overflow:hidden;text-overflow:ellipsis}.line-num2{display:inline-block;float:right;width:30px;overflow:hidden;text-overflow:ellipsis}.d2h-code-linenumber{position:absolute;width:2%;min-width:65px;padding-left:10px;padding-right:10px;height:18px;line-height:18px;background-color:#fff;color:rgba(0,0,0,0.3);text-align:right;border:solid #eeeeee;border-width:0 1px 0 1px;cursor:pointer}.d2h-code-side-linenumber{position:absolute;width:35px;padding-left:10px;padding-right:10px;height:18px;line-height:18px;background-color:#fff;color:rgba(0,0,0,0.3);text-align:right;border:solid #eeeeee;border-width:0 1px 0 1px;cursor:pointer;overflow:hidden;text-overflow:ellipsis}.d2h-del{background-color:#fee8e9;border-color:#e9aeae}.d2h-ins{background-color:#dfd;border-color:#b4e2b4}.d2h-info{background-color:#f8fafd;color:rgba(0,0,0,0.3);border-color:#d5e4f2}.d2h-file-list-wrapper{margin-bottom:10px;padding:0 10px}.d2h-file-list-wrapper a{text-decoration:none;color:#3572b0}.d2h-file-list-wrapper a:visited{color:#3572b0}.d2h-file-list-header{font-weight:bold;margin-bottom:5px;text-align:left;display:inline;float:left}.d2h-file-list-line{text-align:left;font:13px Helvetica,arial,freesans,clean,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"}.d2h-file-list-line .d2h-file-name{line-height:21px}.d2h-file-list{display:none}.d2h-clear{display:block;clear:both}.d2h-show{display:none;float:left}.d2h-hide{float:left}.d2h-hide:target+.d2h-show{display:inline}.d2h-hide:target{display:none}.d2h-hide:target~.d2h-file-list{display:block}
|
||||
2
dist/diff2html.min.js
vendored
2
dist/diff2html.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "diff2html",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"homepage": "http://rtfpessoa.github.io/diff2html/",
|
||||
"description": "Fast Diff to colorized HTML",
|
||||
"keywords": [
|
||||
|
|
|
|||
Loading…
Reference in a new issue