Fetching contributors…
Cannot retrieve contributors at this time
35 lines (17 sloc) 1.62 KB


Important: this project is deprecated, since GitHub supports this natively:

Old Readme

Simple dot.js script that enables syntax highlight for commit diffs on GitHub:


You can install it in one line (assuming you've installed dot.js):

$ curl >> ~/.js/


The project is based on jquery-syntaxhighlighter, which is itself based on Google's Prettify. If you wanna hack it yourself, read on.

My fork of jquery-syntaxhighlighter is included inline in the project (my fork essentially removes borders on the highlighted pre elements).

The script composes all relevant jquery-syntaxhighlighter assets, including css, and wraps it around a function block. footer.js actually calls syntaxhighlighter, while header.js just checks that the current page is a commit page.

highlighter_patch.js essentially prevents unneeded remote loading of assets (as they are all included in the final


Created by Daniel Ribeiro.

Released under the MIT License: