C# scanner file for CodeRay
I'm a C# programmer and don't have much knowledge on RoR.
When I came to Remine, the code highlighting tool "CodeRay" doesn't support C# right now. So I think I need to replace it with another highlighting tool, or make an extension for CodeRay.
There is already a Java scanner file in the current CodeRay library. So I tried to write a C# one according to the Java one. Fortunately, it went smoothly.
The attachment file is the C# scanner I made. It is a temporary solution, because I wrote it just for CodeRay 0.7.6.227, which is also the version Remine is currently using, although there seems to be some improvements in the newer versions of CodeRay. According to the CodeRay roadmap, C# support will be added in version 1.1.
Put the csharp.rb in
And then you may use <pre><code class="csharp">.... block now.
(Optional) You may add aliases in the file
(Optional) You may add file extensions' mappings in the file . And following is my settings:
'cs' => :csharp, 'config' => :xml, 'aspx' => :html, 'resx' => :xml, 'asax' => :html, 'ashx' => :html, 'xaml' => :xml, 'csproj' => :xml, 'xsd' => :xml, 'xsc' => :xml, 'xss' => :xml, 'settings' => :xml,
csharp.rb (4.77 KB)
RE: C# scanner file for CodeRay - Added by Steven Pardo about 3 years ago
Thanks for the c# scanner. It makes our code snippets much easier to read.
RE: C# scanner file for CodeRay - Added by Josh Galvez about 3 years ago
RE: C# scanner file for CodeRay - Added by Dmitry Popov 14 days ago
I've created a C# scanner for CodeRay 1.0.9 based on C++.