Bug #71

Examine Redmine patches

Added by Kornelius Kalnbach over 1 year ago. Updated over 1 year ago.

Status:Closed Start:01/30/2009
Priority:High Due date:
Assigned to:Kornelius Kalnbach % Done:

50%

Category:-
Target version:0.8.3

Description

Redmine's support for CodeRay is buggy, and there have been some patches:

------------------------------------------------------------------------
r1476 | jplang | 2008-05-29 21:12:17 +0200 (Thu, 29 May 2008) | 1 line
Changed paths:
   M /trunk/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/c.rb

Fixed: Unable to use angular braces after include word in c code highlighting (#1230).
------------------------------------------------------------------------
r1272 | jplang | 2008-03-18 18:39:12 +0100 (Tue, 18 Mar 2008) | 1 line
Changed paths:
   M /trunk/vendor/plugins/coderay-0.7.6.227/lib/coderay/helpers/file_type.rb
   A /trunk/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/java.rb

Add a simple java scanner.
------------------------------------------------------------------------
r1070 | jplang | 2008-01-16 21:45:13 +0100 (Wed, 16 Jan 2008) | 2 lines
Changed paths:
   M /trunk/lib/redmine/mime_type.rb
   M /trunk/vendor/plugins/coderay-0.7.6.227/lib/coderay/helpers/file_type.rb
   A /trunk/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/php.rb

Added a couple of mime types so that corresponding files can be viewed in the browser.
Added a simple (and not perfect) CodeRay scanner for php.
------------------------------------------------------------------------
r716 | jplang | 2007-09-07 23:30:46 +0200 (Fri, 07 Sep 2007) | 1 line
Changed paths:
   M /trunk/vendor/plugins/coderay-0.7.6.227/lib/coderay/helpers/file_type.rb
   A /trunk/vendor/plugins/coderay-0.7.6.227/lib/coderay/scanners/javascript.rb

Added javascript highlightment support (http://pastie.textmate.org/50774/)
------------------------------------------------------------------------
r710 | jplang | 2007-09-06 19:06:07 +0200 (Thu, 06 Sep 2007) | 9 lines
Changed paths:
   M /trunk/app/views/wiki/edit.rhtml
   M /trunk/app/views/wiki/show.rhtml
   M /trunk/lib/redmine/wiki_formatting.rb
   M /trunk/public/stylesheets/scm.css
   M /trunk/vendor/plugins/coderay-0.7.6.227/lib/coderay/encoders/html.rb

Added code highlighting support in wiki, using this syntax:

<pre><code> <-- cut here

  <pre><code class="ruby">
    Place you code here.
  </code></pre>  

cut here --> </pre>

The changes are:

  • :escape option for HTML Encoder. (see #88)
  • New Scanner: JavaScript (solved in #23)
  • New Scanner: PHP (#36 - pending)
  • New Scanner: Java (solved in #42)
  • C Scanner: Issue with #include &lt;foo&gt; (angular braces) - this is due to the HTML escape hack. See discussion in #88.
There's also a patch about CodeRay being case-sensitive about lang names:

I think this was solved with r272

coderay-redmine-patches.diff - Redmine patches in their CodeRay folder; svn diff -r644:HEAD (15.4 KB) Kornelius Kalnbach, 01/30/2009 12:53 pm

History

Updated by Kornelius Kalnbach over 1 year ago

  • % Done changed from 0 to 10

Updated by Kornelius Kalnbach over 1 year ago

  • Priority changed from Normal to High

Updated by Kornelius Kalnbach over 1 year ago

  • Target version changed from 0.9 RC1 to 0.8.3

Updated by Kornelius Kalnbach over 1 year ago

  • % Done changed from 10 to 50

PHP scanner is still missing, this will be included in 0.9.

TODO: Talk to the Redmine guys about the problematic :escape hack.

Updated by Kornelius Kalnbach over 1 year ago

  • Status changed from New to Closed

Also available in: Atom PDF