diff2html
Advanced tools
Comparing version 0.1.6 to 0.1.7
{ | ||
"name": "diff2html", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
@@ -74,4 +74,5 @@ "homepage": "https://www.github.com/rtfpessoa/diff2html-nodejs", | ||
"bin", | ||
"src" | ||
"src", | ||
"dist" | ||
] | ||
} |
@@ -13,4 +13,2 @@ # Diff to Html Node Module by [rtfpessoa](https://github.com/rtfpessoa) | ||
* char-by-char highlight | ||
* new and old line numbers | ||
@@ -17,0 +15,0 @@ |
@@ -6,3 +6,3 @@ /* | ||
* Date: Friday 29 August 2014 | ||
* Last Update: Saturday 24 January 2015 | ||
* Last Update: Sunday 2 February 2015 | ||
* | ||
@@ -171,2 +171,5 @@ * Diff commands: | ||
currentFile.newName = values[1]; | ||
var fileSplit = currentFile.newName.split("."); | ||
currentFile.language = fileSplit[fileSplit.length - 1]; | ||
} else if (currentFile && startsWith(line, "@@")) { | ||
@@ -192,3 +195,3 @@ startBlock(line); | ||
diffFiles.map(function (file) { | ||
return "<div class=\"d2h-file-wrapper\">\n" + | ||
return "<div class=\"d2h-file-wrapper\" data-lang=\"" + file.language + "\">\n" + | ||
" <div class=\"d2h-file-header\">\n" + | ||
@@ -219,3 +222,3 @@ " <div class=\"d2h-file-stats\">\n" + | ||
var lines = "<tr>\n" + | ||
" <td class=\"d2h-code-linenumber " + LINE_TYPE.INFO + "\" colspan=\"2\"></td>\n" + | ||
" <td class=\"d2h-code-linenumber " + LINE_TYPE.INFO + "\"></td>\n" + | ||
" <td class=\"" + LINE_TYPE.INFO + "\">" + | ||
@@ -279,3 +282,3 @@ " <div class=\"d2h-code-line " + LINE_TYPE.INFO + "\">" + escape(block.header) + "</div>" + | ||
return "<div class=\"d2h-file-wrapper\">\n" + | ||
return "<div class=\"d2h-file-wrapper\" data-lang=\"" + file.language + "\">\n" + | ||
" <div class=\"d2h-file-header\">\n" + | ||
@@ -322,3 +325,3 @@ " <div class=\"d2h-file-stats\">\n" + | ||
" <td class=\"d2h-code-side-linenumber " + LINE_TYPE.INFO + "\"></td>\n" + | ||
" <td class=\"" + LINE_TYPE.INFO + "\" colspan=\"3\">" + | ||
" <td class=\"" + LINE_TYPE.INFO + "\">" + | ||
" <div class=\"d2h-code-side-line " + LINE_TYPE.INFO + "\">" + escape(block.header) + "</div>" + | ||
@@ -330,3 +333,3 @@ " </td>\n" + | ||
" <td class=\"d2h-code-side-linenumber " + LINE_TYPE.INFO + "\"></td>\n" + | ||
" <td class=\"" + LINE_TYPE.INFO + "\" colspan=\"3\">" + | ||
" <td class=\"" + LINE_TYPE.INFO + "\">" + | ||
" <div class=\"d2h-code-side-line " + LINE_TYPE.INFO + "\"></div>" + | ||
@@ -333,0 +336,0 @@ " </td>\n" + |
32077
9
697
59