diTii.com Digital News Hub

Sign up with your email address to be the first to know about latest news and more.

I agree to have my personal information transfered to MailChimp (more information)

Mar232007

Google Code Prettifier

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

Share This Story, Choose Your Platform!

Do NOT follow this link or you will be banned from the site!