Show nicely formatted diff

This steals the idea and markup from Gitnub. Thanks! :)
This commit is contained in:
Pieter de Bie
2008-06-15 18:22:00 +02:00
parent 62e739bfc0
commit 3432e514b8
7 changed files with 74 additions and 9 deletions
+4 -1
View File
@@ -48,8 +48,11 @@ var doeHet = function() {
});
$("message").innerHTML = commit.message.replace(/\n/g,"<br>");
if (commit.diff.length < 10000) {
if (commit.diff.length < 1000000) {
$("details").hide();
$("details").innerHTML = commit.diff;
highlightDiffs();
$("details").show();
} else {
$("details").innerHTML = "This diff is currently too large to watch in detailed mode";
}