March 23, 2007
3:24 am

Google released a client-side code prettifier. What you do is include their JavaScript and CSS files in your HTML page, trigger execution with an onload="prettyPrint()” event, and then find everything in your <pre class="prettyprint">...</pre> elements be nicely colored.


According to its author Mike Samuel: “It should work on a number of languages including C and friends, Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk and a decent subset of Perl, but, because of commenting conventions, doesn’t work on Smalltalk, Lisp-like, or CAML-like languages.”


FAQ | Example | Download


Google Code’s featured projects | Google blogoscoped


Google, Google Code Prettifier, Code, CSS, HTML, Java, JavaScript

Loading

Contextual Related Posts:

No followup yet

Leave a Response

Comment Preview
« Google Released New Picasa Web Albums Data APIBoogie Announced For Wii »
Feed Icon

Subscribe via RSS or email: