We often find ourselves asking our co-workers, "Does anybody have recommendations for #{task X}?" Frequently, the collective response is based on little more than, "Well, in the past, I had success with #{solution Y}." This is the first in a series of blog posts in which we search for a more empirical answer.
In this case, we have taken over an old rails 2.0.2 application, largely unmaintained for some time. The app allows users to exchange and compare code snippets in a variety of languages. As one of our first tasks in refactoring and updating this app, we have decided to move the task of syntax-highlighting those code snippets from the server into a client-side javascript function. A cursory examination reveals several candidates: highlight.js, prettify, jquery-syntax, syntaxhighlighter, shjs, and lighterjs.
Read moreā¦