Project

General

Profile

Actions

Feature #4267

open

<code> block improvements

Added by Aleksej Lebedev almost 15 years ago. Updated about 12 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Text formatting
Target version:
-
Start date:
2009-11-23
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

I think it would be useful to implement the following features1 for code block

Source code:

&lt;pre&gt;&lt;code class="ruby"&gt;
# The Greeter class
class Greeter
  def initialize(name)
    @name = name.capitalize
  end

  def salute
    puts "Hello #{@name}!" 
  end
end
&lt;/code&gt;&lt;/pre&gt;

Result:

# The Greeter class
class Greeter
  def initialize(name)
    @name = name.capitalize
  end

  def salute
    puts "Hello #{@name}!" 
  end
end

:line_numbers2

&lt;code class="ruby" lineNumbers="yes"&gt;.....&lt;/code&gt;
&lt;code class="ruby" lineNumbers="no"&gt;.....&lt;/code&gt;

:line_number_start2

&lt;code class="ruby" start="50"&gt;.....&lt;/code&gt;

:bold_every2

&lt;code class="ruby" every="2"&gt;.....&lt;/code&gt;

:highlight_lines2

&lt;code class="ruby" highlight="1,3,5,7"&gt;.....&lt;/code&gt;

title

&lt;code class="ruby" title="/path/to/file.rb"&gt;.....&lt;/code&gt;


1 This standard features in CodeRay, but unfortunately not supported in Redmine :(

2 CodeRay HTML Encoder options


Files

Redmine_code_lineNumbers_no.png (5.51 KB) Redmine_code_lineNumbers_no.png Aleksej Lebedev, 2009-11-23 13:46
Redmine_code_start_50.png (6.39 KB) Redmine_code_start_50.png Aleksej Lebedev, 2009-11-23 13:46
Redmine_every_2.png (6.11 KB) Redmine_every_2.png Aleksej Lebedev, 2009-11-23 13:46
Redmine_highlight_1_3_5_7.png (6.22 KB) Redmine_highlight_1_3_5_7.png Aleksej Lebedev, 2009-11-23 13:46
Redmine_title.png (5.32 KB) Redmine_title.png Aleksej Lebedev, 2009-11-23 13:46

Related issues

Related to Redmine - Feature #3382: Ability to select only source code without line numbersClosed2009-05-18

Actions
Actions

Also available in: Atom PDF