A SyntaxHighlighter brush for Lisp
I use SyntaxHighlighter for highlighting code snippets on this blog and I found out that it didn’t come with a brush for the 2.0 version highlighting lisp code. So I wrote my own. I found a SyntaxHighlighter 1.5 brush through google and I converted that to a 2.0 brush and it’s now in a state that sort of works. At least it highlights some code :-) I used that as an excuse to try out qunit as well and write some unit/integration tests for the code. Qunit is cool. There’s not much code in the brush itself as it leans heavily on the core SyntaxHighlighter stuff. So the tests are testing the framework also. But hey, I’m not picky.
It’s all to be found on github:knuthaug/sh-lisp.Patches/pulls via github is more than welcome. I plan to dig out my copy of “Ansi common Lisp” and go through the lists of functions, keywords and macros a bit more in detail. Some more tests are in order to. One question which comes to mind is if it’s best to do one that does common lisp and emacs-lisp, or one brush for each dialect?
Here’s the code for brush: