Those of you that follow me on github/gemcutter will have noticed allot of activity the past couple of days. All of this has been to achieve stable syntax highlighting for TrainBBCode. Which I'm happy to say now works!
At first I was using a jQuery based Syntax Highlighter which seemed buggy at best when using it here. This also meant that TrainBBCode came with a huge generator which I disliked.
I had experimented with Ultraviolet but one of its dependencies was a pain to install, and I couldn't get it to work on my Production Server. So my main use of TrainBBCode would not have syntax highlighting, which of course made me re-consider.
CodeRay now provides syntax highlighting, being an all ruby library with no dependencies makes it very easy to install. It is also very quick, and does not laggggg anything when generating.
I have also added a .css method to the TBBC Object that spews the styles needed for CodeRay. It comes wrapped in its own style tags, so just needs placing in the head tags of your layout.
My Blog