test of simplehighlight plugin
comments | Posted in ruby | simplelog on Tuesday, August 07 2007 05:36:00 GMT

Here is a test of simplehighlight.

def foo @name = 'david' @age = "26".to_i end

whheee :]

Install Notes

It can be difficult installing the Oniguruma regex library. Oniguruma is a regular expression library that allows every state of an regex to be encoded in a different character format.

I have opted to use this plugin because I have experience using [at least] the following languages (in no particular order): javascript, html, assembly, php, ruby, ML, Prolog, Java, C, C++, Ada, Fortran77, windows batch files, Shell languages like Bash, Pascal. So, I would like to be able to put up pretty printed code snippets for you inquisitive visitors.

This plugin is powered by the Ultraviolet syntax engine. Ultimately it allows for pretty printing of all of TextMate's allowed syntax highlighters. The list of valid languages can be seen in the TextMate repository.

Under ubuntu I had to apt-get install libonig2 libonig-dev in order to be able to gem install ultraviolet --include-dependencies

The kicker is knowing you need libonig-dev to get all the required header files for the native gem extension compilation.

Also be aware that if you want to change the CSS theme you have to: place the CSS in your themes directory, update the SimpleHighlighter.rb file to set the THEME value to the desired theme name AND add the css in your site.rhtml file. whew!

blog comments powered by Disqus