You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks Joshua! The C# scanner Joshua mentioned was created and posted by me.
For I don't have enough knowledge on Ruby, I only made small modifications on the Java scanner carefully to make it work with C#.
Because I don't know how to set up a standalone environment for developing for the latest version Coderay, I just worked in the Redmine environment. As a result, I could only use an old version of the Java scanner to start with, but not the latest version.
The version of Coderay in Redmine current trunk is now 0.7.6.227, quite an old version, lacking of quite a lot of new features.
Hmmm, I just read the "current" java scanner. It's a lot different than this old code. I guess it'll need a total rewrite in order to be used with the current coderay.
Activity
sloncho commentedon Jan 21, 2013
I have tried this scanner, and it works ok, but unfortunately it breaks with a simple case:
public void TestCode() { Console.WriteLine("breaks here"); } It produces this error:***ERROR in scanner.rb:200:in `tokenize': Unknown token content type: :open, kind = :string (after 0 tokens) tokens: current line: 3 column: 23 pos: 47 matched: "\"" state: "Error in CodeRay::Scanners::CSharp#scan_tokens, initial state was: nil" bol? = false, eos? = false surrounding code: "ode()\n{\n Console.WriteLine(\"" ~~ "breaks here\");\n}\n" ***ERROR***Unfortunately, I'm not a Ruby dev, so I could not really locate the problem. Any help will be highly appreciated.
korny commentedon Jan 21, 2013
So, a bug report for a pull request ^^ Does Joshua Galvez have a GitHub account so we can inform him?
sloncho commentedon Jan 21, 2013
Hmmm, I just read the "current" java scanner. It's a lot different than this old code. I guess it'll need a total rewrite in order to be used with the current coderay.
korny commentedon Jan 21, 2013
You're right, the error does seem to result from incompatiblity.
sloncho commentedon Jan 21, 2013
As I'm not ruby dev, but have very good knowledge of c#, how can I help modifying the existing java scanner to create a new c# one?
emperor-ming commentedon Jan 23, 2013
Ey, dudes! It will be great to have a scanner of C# (we use it intensively in Redmine environment).
Thanks for trying sloncho!
thegcat commentedon Jul 4, 2013
There's a scanner for C# attached to http://www.redmine.org/boards/3/topics/11616#message-37780 that should work with Coderay 1.0.x, I haven't tried it though.
ganaware commentedon Aug 17, 2015
I have wrote another C# scanner: #186
matee911 commentedon Aug 21, 2015
👍
emperador-ming commentedon Aug 21, 2015
Great news!
ganaware commentedon Aug 24, 2015
There are some bugs, so I withdraw this request #186 .
I'm now fixing bugs in https://github.com/ganaware/coderay/tree/csharp-scanner ,
and testing in https://github.com/ganaware/coderay-scanner-tests/tree/csharp-scanner .
Please try it.