Improve line-height
This commit is contained in:
parent
a5835850c6
commit
7fbc8c238a
9 changed files with 59 additions and 84 deletions
|
|
@ -2,7 +2,6 @@
|
|||
"parserOptions": {
|
||||
"ecmaVersion": 6,
|
||||
"ecmaFeatures": {
|
||||
"experimentalObjectRestSpread": true,
|
||||
"jsx": true
|
||||
},
|
||||
"sourceType": "module"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
(function() {
|
||||
if (!!!global.browserTemplates) global.browserTemplates = {};
|
||||
var Hogan = require("hogan.js");global.browserTemplates["file-summary-line"] = new Hogan.Template({code: function (c,p,i) { var t=this;t.b(i=i||"");t.b("<li class=\"d2h-file-list-line\">");t.b("\n" + i);t.b(" <span class=\"d2h-file-name-wrapper\">");t.b("\n" + i);t.b(" <span>");t.b(t.rp("<fileIcon0",c,p,""));t.b("</span>");t.b("\n" + i);t.b(" <a href=\"#");t.b(t.v(t.f("fileHtmlId",c,p,0)));t.b("\" class=\"d2h-file-name\">");t.b(t.v(t.f("fileName",c,p,0)));t.b("</a>");t.b("\n" + i);t.b(" <span class=\"d2h-file-stats\">");t.b("\n" + i);t.b(" <span class=\"d2h-lines-added\">");t.b(t.v(t.f("addedLines",c,p,0)));t.b("</span>");t.b("\n" + i);t.b(" <span class=\"d2h-lines-deleted\">");t.b(t.v(t.f("deletedLines",c,p,0)));t.b("</span>");t.b("\n" + i);t.b(" </span>");t.b("\n" + i);t.b(" </span>");t.b("\n" + i);t.b("</li>");return t.fl(); },partials: {"<fileIcon0":{name:"fileIcon", partials: {}, subs: { }}}, subs: { }});
|
||||
var Hogan = require("hogan.js");global.browserTemplates["file-summary-line"] = new Hogan.Template({code: function (c,p,i) { var t=this;t.b(i=i||"");t.b("<li class=\"d2h-file-list-line\">");t.b("\n" + i);t.b(" <span class=\"d2h-file-name-wrapper\">");t.b("\n" + i);t.b(t.rp("<fileIcon0",c,p," "));t.b(" <a href=\"#");t.b(t.v(t.f("fileHtmlId",c,p,0)));t.b("\" class=\"d2h-file-name\">");t.b(t.v(t.f("fileName",c,p,0)));t.b("</a>");t.b("\n" + i);t.b(" <span class=\"d2h-file-stats\">");t.b("\n" + i);t.b(" <span class=\"d2h-lines-added\">");t.b(t.v(t.f("addedLines",c,p,0)));t.b("</span>");t.b("\n" + i);t.b(" <span class=\"d2h-lines-deleted\">");t.b(t.v(t.f("deletedLines",c,p,0)));t.b("</span>");t.b("\n" + i);t.b(" </span>");t.b("\n" + i);t.b(" </span>");t.b("\n" + i);t.b("</li>");return t.fl(); },partials: {"<fileIcon0":{name:"fileIcon", partials: {}, subs: { }}}, subs: { }});
|
||||
global.browserTemplates["file-summary-wrapper"] = new Hogan.Template({code: function (c,p,i) { var t=this;t.b(i=i||"");t.b("<div class=\"d2h-file-list-wrapper\">");t.b("\n" + i);t.b(" <div class=\"d2h-file-list-header\">");t.b("\n" + i);t.b(" <span class=\"d2h-file-list-title\">Files changed (");t.b(t.v(t.f("filesNumber",c,p,0)));t.b(")</span>");t.b("\n" + i);t.b(" <a class=\"d2h-file-switch d2h-hide\">hide</a>");t.b("\n" + i);t.b(" <a class=\"d2h-file-switch d2h-show\">show</a>");t.b("\n" + i);t.b(" </div>");t.b("\n" + i);t.b(" <ol class=\"d2h-file-list\">");t.b("\n" + i);t.b(" ");t.b(t.t(t.f("files",c,p,0)));t.b("\n" + i);t.b(" </ol>");t.b("\n" + i);t.b("</div>");return t.fl(); },partials: {}, subs: { }});
|
||||
global.browserTemplates["generic-column-line-number"] = new Hogan.Template({code: function (c,p,i) { var t=this;t.b(i=i||"");t.b("<tr>");t.b("\n" + i);t.b(" <td class=\"");t.b(t.v(t.f("lineClass",c,p,0)));t.b(" ");t.b(t.v(t.d("diffParser.LINE_TYPE.INFO",c,p,0)));t.b("\"></td>");t.b("\n" + i);t.b(" <td class=\"");t.b(t.v(t.d("diffParser.LINE_TYPE.INFO",c,p,0)));t.b("\">");t.b("\n" + i);t.b(" <div class=\"");t.b(t.v(t.f("contentClass",c,p,0)));t.b(" ");t.b(t.v(t.d("diffParser.LINE_TYPE.INFO",c,p,0)));t.b("\">");t.b(t.t(t.f("blockHeader",c,p,0)));t.b("</div>");t.b("\n" + i);t.b(" </td>");t.b("\n" + i);t.b("</tr>");return t.fl(); },partials: {}, subs: { }});
|
||||
global.browserTemplates["generic-empty-diff"] = new Hogan.Template({code: function (c,p,i) { var t=this;t.b(i=i||"");t.b("<tr>");t.b("\n" + i);t.b(" <td class=\"");t.b(t.v(t.d("diffParser.LINE_TYPE.INFO",c,p,0)));t.b("\">");t.b("\n" + i);t.b(" <div class=\"");t.b(t.v(t.f("contentClass",c,p,0)));t.b(" ");t.b(t.v(t.d("diffParser.LINE_TYPE.INFO",c,p,0)));t.b("\">");t.b("\n" + i);t.b(" File without changes");t.b("\n" + i);t.b(" </div>");t.b("\n" + i);t.b(" </td>");t.b("\n" + i);t.b("</tr>");return t.fl(); },partials: {}, subs: { }});
|
||||
global.browserTemplates["generic-file-path"] = new Hogan.Template({code: function (c,p,i) { var t=this;t.b(i=i||"");t.b("<span class=\"d2h-file-name-wrapper\">");t.b("\n" + i);t.b(" <span class=\"d2h-icon-wrapper\">");t.b(t.rp("<fileIcon0",c,p,""));t.b("</span>");t.b("\n" + i);t.b(" <span class=\"d2h-file-name\">");t.b(t.v(t.f("fileDiffName",c,p,0)));t.b("</span>");t.b("\n" + i);t.b(t.rp("<fileTag1",c,p," "));t.b("</span>");return t.fl(); },partials: {"<fileIcon0":{name:"fileIcon", partials: {}, subs: { }},"<fileTag1":{name:"fileTag", partials: {}, subs: { }}}, subs: { }});
|
||||
global.browserTemplates["generic-file-path"] = new Hogan.Template({code: function (c,p,i) { var t=this;t.b(i=i||"");t.b("<span class=\"d2h-file-name-wrapper\">");t.b("\n" + i);t.b(t.rp("<fileIcon0",c,p," "));t.b(" <span class=\"d2h-file-name\">");t.b(t.v(t.f("fileDiffName",c,p,0)));t.b("</span>");t.b("\n" + i);t.b(t.rp("<fileTag1",c,p," "));t.b("</span>");return t.fl(); },partials: {"<fileIcon0":{name:"fileIcon", partials: {}, subs: { }},"<fileTag1":{name:"fileTag", partials: {}, subs: { }}}, subs: { }});
|
||||
global.browserTemplates["generic-line"] = new Hogan.Template({code: function (c,p,i) { var t=this;t.b(i=i||"");t.b("<tr>");t.b("\n" + i);t.b(" <td class=\"");t.b(t.v(t.f("lineClass",c,p,0)));t.b(" ");t.b(t.v(t.f("type",c,p,0)));t.b("\">");t.b("\n" + i);t.b(" ");t.b(t.t(t.f("lineNumber",c,p,0)));t.b("\n" + i);t.b(" </td>");t.b("\n" + i);t.b(" <td class=\"");t.b(t.v(t.f("type",c,p,0)));t.b("\">");t.b("\n" + i);t.b(" <div class=\"");t.b(t.v(t.f("contentClass",c,p,0)));t.b(" ");t.b(t.v(t.f("type",c,p,0)));t.b("\">");t.b("\n" + i);if(t.s(t.f("prefix",c,p,1),c,p,0,171,247,"{{ }}")){t.rs(c,p,function(c,p,t){t.b(" <span class=\"d2h-code-line-prefix\">");t.b(t.t(t.f("prefix",c,p,0)));t.b("</span>");t.b("\n" + i);});c.pop();}if(t.s(t.f("content",c,p,1),c,p,0,279,353,"{{ }}")){t.rs(c,p,function(c,p,t){t.b(" <span class=\"d2h-code-line-ctn\">");t.b(t.t(t.f("content",c,p,0)));t.b("</span>");t.b("\n" + i);});c.pop();}t.b(" </div>");t.b("\n" + i);t.b(" </td>");t.b("\n" + i);t.b("</tr>");return t.fl(); },partials: {}, subs: { }});
|
||||
global.browserTemplates["generic-wrapper"] = new Hogan.Template({code: function (c,p,i) { var t=this;t.b(i=i||"");t.b("<div class=\"d2h-wrapper\">");t.b("\n" + i);t.b(" ");t.b(t.t(t.f("content",c,p,0)));t.b("\n" + i);t.b("</div>");return t.fl(); },partials: {}, subs: { }});
|
||||
global.browserTemplates["icon-file-added"] = new Hogan.Template({code: function (c,p,i) { var t=this;t.b(i=i||"");t.b("<svg aria-hidden=\"true\" class=\"d2h-icon d2h-added\" height=\"16\" title=\"added\" version=\"1.1\" viewBox=\"0 0 14 16\"");t.b("\n" + i);t.b(" width=\"14\">");t.b("\n" + i);t.b(" <path d=\"M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM6 9H3V7h3V4h2v3h3v2H8v3H6V9z\"></path>");t.b("\n" + i);t.b("</svg>");return t.fl(); },partials: {}, subs: { }});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<li class="d2h-file-list-line">
|
||||
<span class="d2h-file-name-wrapper">
|
||||
<span>{{>fileIcon}}</span>
|
||||
{{>fileIcon}}
|
||||
<a href="#{{fileHtmlId}}" class="d2h-file-name">{{fileName}}</a>
|
||||
<span class="d2h-file-stats">
|
||||
<span class="d2h-lines-added">{{addedLines}}</span>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<span class="d2h-file-name-wrapper">
|
||||
<span class="d2h-icon-wrapper">{{>fileIcon}}</span>
|
||||
{{>fileIcon}}
|
||||
<span class="d2h-file-name">{{fileDiffName}}</span>
|
||||
{{>fileTag}}
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
}
|
||||
|
||||
.d2h-file-header {
|
||||
height: 35px;
|
||||
padding: 5px 10px;
|
||||
border-bottom: 1px solid #d8d8d8;
|
||||
background-color: #f7f7f7;
|
||||
|
|
@ -58,7 +59,6 @@
|
|||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow-x: hidden;
|
||||
line-height: 21px;
|
||||
}
|
||||
|
||||
.d2h-file-wrapper {
|
||||
|
|
@ -76,7 +76,7 @@
|
|||
|
||||
.d2h-diff-tbody > tr > td {
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.d2h-files-diff {
|
||||
|
|
@ -103,14 +103,12 @@
|
|||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
padding: 0 10px;
|
||||
margin-left: 80px;
|
||||
}
|
||||
|
||||
.d2h-code-side-line {
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
padding: 0 10px;
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
.d2h-code-line del,
|
||||
|
|
@ -168,7 +166,6 @@
|
|||
|
||||
.d2h-code-linenumber {
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
width: 86px;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
|
|
@ -182,7 +179,6 @@
|
|||
|
||||
.d2h-code-side-linenumber {
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
width: 56px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
|
|
@ -285,10 +281,6 @@
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
.d2h-icon-wrapper {
|
||||
line-height: 31px;
|
||||
}
|
||||
|
||||
.d2h-icon {
|
||||
vertical-align: middle;
|
||||
margin-right: 10px;
|
||||
|
|
|
|||
|
|
@ -57,11 +57,10 @@ var filesExample1 =
|
|||
' <ol class="d2h-file-list">\n' +
|
||||
' <li class="d2h-file-list-line">\n' +
|
||||
' <span class="d2h-file-name-wrapper">\n' +
|
||||
' <span><svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1"\n' +
|
||||
' <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1"\n' +
|
||||
' viewBox="0 0 14 16" width="14">\n' +
|
||||
' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path>\n' +
|
||||
'</svg></span>\n' +
|
||||
' <a href="#d2h-675094" class="d2h-file-name">sample</a>\n' +
|
||||
' </svg> <a href="#d2h-675094" class="d2h-file-name">sample</a>\n' +
|
||||
' <span class="d2h-file-stats">\n' +
|
||||
' <span class="d2h-lines-added">+1</span>\n' +
|
||||
' <span class="d2h-lines-deleted">-1</span>\n' +
|
||||
|
|
@ -76,10 +75,9 @@ var htmlLineExample1 =
|
|||
' <div id="d2h-675094" class="d2h-file-wrapper" data-lang="">\n' +
|
||||
' <div class="d2h-file-header">\n' +
|
||||
' <span class="d2h-file-name-wrapper">\n' +
|
||||
' <span class="d2h-icon-wrapper"><svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>\n' +
|
||||
'</svg></span>\n' +
|
||||
' <span class="d2h-file-name">sample</span>\n' +
|
||||
' </svg> <span class="d2h-file-name">sample</span>\n' +
|
||||
' <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span>\n' +
|
||||
' </div>\n' +
|
||||
' <div class="d2h-file-diff">\n' +
|
||||
|
|
@ -128,10 +126,9 @@ var htmlSideExample1 =
|
|||
' <div id="d2h-675094" class="d2h-file-wrapper" data-lang="">\n' +
|
||||
' <div class="d2h-file-header">\n' +
|
||||
' <span class="d2h-file-name-wrapper">\n' +
|
||||
' <span class="d2h-icon-wrapper"><svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>\n' +
|
||||
'</svg></span>\n' +
|
||||
' <span class="d2h-file-name">sample</span>\n' +
|
||||
' </svg> <span class="d2h-file-name">sample</span>\n' +
|
||||
' <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span>\n' +
|
||||
' </div>\n' +
|
||||
' <div class="d2h-files-diff">\n' +
|
||||
|
|
@ -317,10 +314,9 @@ describe('Diff2Html', function() {
|
|||
' <div id="d2h-211439" class="d2h-file-wrapper" data-lang="md">\n' +
|
||||
' <div class="d2h-file-header">\n' +
|
||||
' <span class="d2h-file-name-wrapper">\n' +
|
||||
' <span class="d2h-icon-wrapper"><svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>\n' +
|
||||
'</svg></span>\n' +
|
||||
' <span class="d2h-file-name">CHANGELOG.md</span>\n' +
|
||||
' </svg> <span class="d2h-file-name">CHANGELOG.md</span>\n' +
|
||||
' <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span>\n' +
|
||||
' </div>\n' +
|
||||
' <div class="d2h-file-diff">\n' +
|
||||
|
|
|
|||
|
|
@ -45,11 +45,10 @@ describe('FileListPrinter', function() {
|
|||
' <ol class="d2h-file-list">\n' +
|
||||
' <li class="d2h-file-list-line">\n' +
|
||||
' <span class="d2h-file-name-wrapper">\n' +
|
||||
' <span><svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1"\n' +
|
||||
' <svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1"\n' +
|
||||
' viewBox="0 0 14 16" width="14">\n' +
|
||||
' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path>\n' +
|
||||
'</svg></span>\n' +
|
||||
' <a href="#d2h-781444" class="d2h-file-name">my/file/name.js</a>\n' +
|
||||
' </svg> <a href="#d2h-781444" class="d2h-file-name">my/file/name.js</a>\n' +
|
||||
' <span class="d2h-file-stats">\n' +
|
||||
' <span class="d2h-lines-added">+12</span>\n' +
|
||||
' <span class="d2h-lines-deleted">-41</span>\n' +
|
||||
|
|
@ -58,11 +57,10 @@ describe('FileListPrinter', function() {
|
|||
'</li>\n' +
|
||||
'<li class="d2h-file-list-line">\n' +
|
||||
' <span class="d2h-file-name-wrapper">\n' +
|
||||
' <span><svg aria-hidden="true" class="d2h-icon d2h-moved" height="16" title="renamed" version="1.1"\n' +
|
||||
' <svg aria-hidden="true" class="d2h-icon d2h-moved" height="16" title="renamed" version="1.1"\n' +
|
||||
' viewBox="0 0 14 16" width="14">\n' +
|
||||
' <path d="M6 9H3V7h3V4l5 4-5 4V9z m8-7v12c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h12c0.55 0 1 0.45 1 1z m-1 0H1v12h12V2z"></path>\n' +
|
||||
'</svg></span>\n' +
|
||||
' <a href="#d2h-662683" class="d2h-file-name">my/file/{name1.js → name2.js}</a>\n' +
|
||||
' </svg> <a href="#d2h-662683" class="d2h-file-name">my/file/{name1.js → name2.js}</a>\n' +
|
||||
' <span class="d2h-file-stats">\n' +
|
||||
' <span class="d2h-lines-added">+12</span>\n' +
|
||||
' <span class="d2h-lines-deleted">-41</span>\n' +
|
||||
|
|
@ -71,11 +69,10 @@ describe('FileListPrinter', function() {
|
|||
'</li>\n' +
|
||||
'<li class="d2h-file-list-line">\n' +
|
||||
' <span class="d2h-file-name-wrapper">\n' +
|
||||
' <span><svg aria-hidden="true" class="d2h-icon d2h-added" height="16" title="added" version="1.1" viewBox="0 0 14 16"\n' +
|
||||
' <svg aria-hidden="true" class="d2h-icon d2h-added" height="16" title="added" version="1.1" viewBox="0 0 14 16"\n' +
|
||||
' width="14">\n' +
|
||||
' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM6 9H3V7h3V4h2v3h3v2H8v3H6V9z"></path>\n' +
|
||||
'</svg></span>\n' +
|
||||
' <a href="#d2h-781444" class="d2h-file-name">my/file/name.js</a>\n' +
|
||||
' </svg> <a href="#d2h-781444" class="d2h-file-name">my/file/name.js</a>\n' +
|
||||
' <span class="d2h-file-stats">\n' +
|
||||
' <span class="d2h-lines-added">+12</span>\n' +
|
||||
' <span class="d2h-lines-deleted">-0</span>\n' +
|
||||
|
|
@ -84,11 +81,10 @@ describe('FileListPrinter', function() {
|
|||
'</li>\n' +
|
||||
'<li class="d2h-file-list-line">\n' +
|
||||
' <span class="d2h-file-name-wrapper">\n' +
|
||||
' <span><svg aria-hidden="true" class="d2h-icon d2h-deleted" height="16" title="removed" version="1.1"\n' +
|
||||
' <svg aria-hidden="true" class="d2h-icon d2h-deleted" height="16" title="removed" version="1.1"\n' +
|
||||
' viewBox="0 0 14 16" width="14">\n' +
|
||||
' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM11 9H3V7h8v2z"></path>\n' +
|
||||
'</svg></span>\n' +
|
||||
' <a href="#d2h-781444" class="d2h-file-name">my/file/name.js</a>\n' +
|
||||
' </svg> <a href="#d2h-781444" class="d2h-file-name">my/file/name.js</a>\n' +
|
||||
' <span class="d2h-file-stats">\n' +
|
||||
' <span class="d2h-lines-added">+0</span>\n' +
|
||||
' <span class="d2h-lines-deleted">-41</span>\n' +
|
||||
|
|
|
|||
|
|
@ -152,10 +152,9 @@ describe('LineByLinePrinter', function() {
|
|||
'<div id="d2h-781444" class="d2h-file-wrapper" data-lang="js">\n' +
|
||||
' <div class="d2h-file-header">\n' +
|
||||
' <span class="d2h-file-name-wrapper">\n' +
|
||||
' <span class="d2h-icon-wrapper"><svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>\n' +
|
||||
'</svg></span>\n' +
|
||||
' <span class="d2h-file-name">my/file/name.js</span>\n' +
|
||||
' </svg> <span class="d2h-file-name">my/file/name.js</span>\n' +
|
||||
' <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span>\n' +
|
||||
' </div>\n' +
|
||||
' <div class="d2h-file-diff">\n' +
|
||||
|
|
@ -190,10 +189,9 @@ describe('LineByLinePrinter', function() {
|
|||
'<div id="d2h-781444" class="d2h-file-wrapper" data-lang="js">\n' +
|
||||
' <div class="d2h-file-header">\n' +
|
||||
' <span class="d2h-file-name-wrapper">\n' +
|
||||
' <span class="d2h-icon-wrapper"><svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>\n' +
|
||||
'</svg></span>\n' +
|
||||
' <span class="d2h-file-name">my/file/name.js</span>\n' +
|
||||
' </svg> <span class="d2h-file-name">my/file/name.js</span>\n' +
|
||||
' <span class="d2h-tag d2h-added d2h-added-tag">ADDED</span></span>\n' +
|
||||
' </div>\n' +
|
||||
' <div class="d2h-file-diff">\n' +
|
||||
|
|
@ -228,10 +226,9 @@ describe('LineByLinePrinter', function() {
|
|||
'<div id="d2h-781444" class="d2h-file-wrapper" data-lang="js">\n' +
|
||||
' <div class="d2h-file-header">\n' +
|
||||
' <span class="d2h-file-name-wrapper">\n' +
|
||||
' <span class="d2h-icon-wrapper"><svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>\n' +
|
||||
'</svg></span>\n' +
|
||||
' <span class="d2h-file-name">my/file/name.js</span>\n' +
|
||||
' </svg> <span class="d2h-file-name">my/file/name.js</span>\n' +
|
||||
' <span class="d2h-tag d2h-deleted d2h-deleted-tag">DELETED</span></span>\n' +
|
||||
' </div>\n' +
|
||||
' <div class="d2h-file-diff">\n' +
|
||||
|
|
@ -266,10 +263,9 @@ describe('LineByLinePrinter', function() {
|
|||
'<div id="d2h-662683" class="d2h-file-wrapper" data-lang="js">\n' +
|
||||
' <div class="d2h-file-header">\n' +
|
||||
' <span class="d2h-file-name-wrapper">\n' +
|
||||
' <span class="d2h-icon-wrapper"><svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>\n' +
|
||||
'</svg></span>\n' +
|
||||
' <span class="d2h-file-name">my/file/{name1.js → name2.js}</span>\n' +
|
||||
' </svg> <span class="d2h-file-name">my/file/{name1.js → name2.js}</span>\n' +
|
||||
' <span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span></span>\n' +
|
||||
' </div>\n' +
|
||||
' <div class="d2h-file-diff">\n' +
|
||||
|
|
@ -345,10 +341,9 @@ describe('LineByLinePrinter', function() {
|
|||
' <div id="d2h-675094" class="d2h-file-wrapper" data-lang="">\n' +
|
||||
' <div class="d2h-file-header">\n' +
|
||||
' <span class="d2h-file-name-wrapper">\n' +
|
||||
' <span class="d2h-icon-wrapper"><svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>\n' +
|
||||
'</svg></span>\n' +
|
||||
' <span class="d2h-file-name">sample</span>\n' +
|
||||
' </svg> <span class="d2h-file-name">sample</span>\n' +
|
||||
' <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span>\n' +
|
||||
' </div>\n' +
|
||||
' <div class="d2h-file-diff">\n' +
|
||||
|
|
@ -411,10 +406,9 @@ describe('LineByLinePrinter', function() {
|
|||
' <div id="d2h-675094" class="d2h-file-wrapper" data-lang="js">\n' +
|
||||
' <div class="d2h-file-header">\n' +
|
||||
' <span class="d2h-file-name-wrapper">\n' +
|
||||
' <span class="d2h-icon-wrapper"><svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>\n' +
|
||||
'</svg></span>\n' +
|
||||
' <span class="d2h-file-name">sample</span>\n' +
|
||||
' </svg> <span class="d2h-file-name">sample</span>\n' +
|
||||
' <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span>\n' +
|
||||
' </div>\n' +
|
||||
' <div class="d2h-file-diff">\n' +
|
||||
|
|
|
|||
|
|
@ -237,10 +237,9 @@ describe('SideBySidePrinter', function() {
|
|||
' <div id="d2h-675094" class="d2h-file-wrapper" data-lang="">\n' +
|
||||
' <div class="d2h-file-header">\n' +
|
||||
' <span class="d2h-file-name-wrapper">\n' +
|
||||
' <span class="d2h-icon-wrapper"><svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>\n' +
|
||||
'</svg></span>\n' +
|
||||
' <span class="d2h-file-name">sample</span>\n' +
|
||||
' </svg> <span class="d2h-file-name">sample</span>\n' +
|
||||
' <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span>\n' +
|
||||
' </div>\n' +
|
||||
' <div class="d2h-files-diff">\n' +
|
||||
|
|
@ -314,10 +313,9 @@ describe('SideBySidePrinter', function() {
|
|||
' <div id="d2h-675094" class="d2h-file-wrapper" data-lang="js">\n' +
|
||||
' <div class="d2h-file-header">\n' +
|
||||
' <span class="d2h-file-name-wrapper">\n' +
|
||||
' <span class="d2h-icon-wrapper"><svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">\n' +
|
||||
' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>\n' +
|
||||
'</svg></span>\n' +
|
||||
' <span class="d2h-file-name">sample</span>\n' +
|
||||
' </svg> <span class="d2h-file-name">sample</span>\n' +
|
||||
' <span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span></span>\n' +
|
||||
' </div>\n' +
|
||||
' <div class="d2h-files-diff">\n' +
|
||||
|
|
|
|||
Loading…
Reference in a new issue