JetThoughts

Enable line numbers in Toto syntaxhighlight

September 4th 2010

Syntax Highlighting by Rack::CodeHighlighter gem has a bug. May be I did wrong steps. But by default CodeRay disable to show line numbers for code. I did not found any options to enable it by CodeHighlighter. So input next lines in config.ru will show line numbers.

1 CodeRay::Encoders["html"]::DEFAULT_OPTIONS[:line_numbers]=:inline

But I have a problem with css. I found that CodeHighlighter generate not correct html for CodeRay and default theme’s css for Toto broke this highlighting too. You could use my fixed coderay.css for Toto.

blog comments powered by Disqus

Powered by Rackspace Cloud Computing