Syntax highlight code !!1!! >Syntax highlight code !!2!! !!3!! I just had a go at bodging in a syntax highlighter for ruby code. Patch below against the WikiRedcloth class in the soks-view.rb file. You need to have !!4!! installed, preferably as a gem. You also need to add some appropriate definitions to your css in the attachment directory of your wiki. Copying and pasting those from !!5!! would do. !!6!! !!7!! Unfortunately it doesn’t work quite correctly because of the escaping that Redcloth does1. It is also very slow. I therefore probably won’t put it in the next release, but it is here in case anyone wants to adapt and improve. !!8!! !!9!! !!10!! !!11!! !!12!! > !!13!! 1 !!14!! Because I’m not very bright, I find it very hard to figure out the millions of Regexps in _why’s Redcloth code so I haven’t yet worked out where it does this and how to stop it... !!15!!
Edit this page or watch for changes using RSS.