Use CodeRay for syntax highlighting
-
Matias Korhonen
I just found out that there's a gem that can integrate the CodeRay functionality in RedCloth, imaginatively named Redcloth with CodeRay.
This could be a way of reducing the amount of JS that we employ even further.
-
Matias Korhonen
- Title changed from RFC: Use CodeRay for the revision control diffs to RFC: Use CodeRay for the revision control diffs and/or source code highlighting
-
Matias Korhonen
I have just discovered that CodeRay itself has a ForRedCloth "hack":
A little hack to enable CodeRay highlighting in RedCloth.
http://coderay.rubychan.de/doc/
Based on a quick test I did in irb, it seems to work!
-
Joao Carlos
- Milestone changed from 1.0 (The Ultimate Stable Release) to 0.5
- Assigned user set to Joao Carlos
-
Matias Korhonen
- Title changed from RFC: Use CodeRay for the revision control diffs and/or source code highlighting to Use CodeRay for syntax highlighting
-
Joao Carlos
- State changed from new to open
I'm already working on this.
RedCloth 4.2 doesn't work with the stable version of CodeRay. I had to get the SVN version, build the gem and install it. Worked fine.
One more problem tho: how do you get code on more than one line?
-
Joao Carlos
And regarding your description "We could stop using SyntaxHighlighter in the admin section", I think we can get completely rid of it. Everywhere.
-
Matias Korhonen
One more problem tho: how do you get code on more than one line?
Do we have to use the Redcloth with CodeRay gem?
That allows multi-line code samples with a special <source> tag.
-
Joao Carlos
- State changed from open to resolved
Done! Forgot to append the ticket number to the commit messages.
-
Joao Carlos
(from [320a41ea44e3f96d4975c3171e7ef9140792fdeb]) Switched to Redcloth with CodeRay [#142 Use CodeRay for syntax highlighting] [#144 Code block should print line numbers state:resolved] [#145 Code block should be clearly distinguished from other content state:resolved] http://github.com/jcxplorer/hhlc/commit/320a41ea44e3f96d4975c3171e7...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.