I want to use syntax highlighting along with redcloth.
The description of coderay says:
Fast and easy syntax highlighting for selected languages, written in Ruby. Comes with RedCloth integration and LOC counter. 1
But I did not find a documentation about how to do this?
Where should I put the code to do the hightlighting? I thought about putting it into module ApplicationHelper
is this a good idea?
OPTION 1:
Simpe as this: http://railscasts.com/episodes/207-syntax-highlighting?autoplay=true When using rails3 change helper to this:
If you use HAML you will want to use ~ sign:
OPTION 2:
CodeRay has built-in support for RedCloth.
I prefere the second option.
You can find more about styling with Textile markup language at http://en.wikipedia.org/wiki/Textile_(markup_language)