Permalink
Browse files

Whitespace.

  • Loading branch information...
1 parent 90a36d4 commit b2380a7e471c1f0218d0465316e0b50bd6211f8e @scottgonzalez committed Mar 5, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 pretty-diff.js
View
@@ -9,26 +9,26 @@ diff( process.argv.slice( 2 ).join( " " ), function( error, parsedDiff ) {
process.stderr.write( error );
return;
}
-
+
if ( !parsedDiff ) {
console.log( "No differences" );
return;
}
-
+
generatePrettyDiff( parsedDiff );
});
function generatePrettyDiff( parsedDiff ) {
var template = fs.readFileSync( __dirname + "/template.html", "utf8" ),
diffHtml = "";
-
+
for ( var file in parsedDiff ) {
diffHtml += "<h2>" + file + "</h2>" +
"<div class='file-diff'><div>" +
markUpDiff( parsedDiff[ file ] ) +
"</div></div>";
}
-
+
fs.writeFileSync( "/tmp/diff.html", template.replace( "{{diff}}", diffHtml ) );
exec( "open /tmp/diff.html" );
}

0 comments on commit b2380a7

Please sign in to comment.