Project

General

Profile

Actions

Feature #4267

open

<code> block improvements

Feature #4267: <code> block improvements

Added by Aleksej Lebedev almost 17 years ago. Updated about 14 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Text formatting
Target version:
-
Resolution:

Description

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

Source code:

<pre><code class="ruby">
# The Greeter class
class Greeter
  def initialize(name)
    @name = name.capitalize
  end

  def salute
    puts "Hello #{@name}!" 
  end
end
</code></pre>

Result:

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

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

:line_numbers2

<code class="ruby" lineNumbers="yes">.....</code>
<code class="ruby" lineNumbers="no">.....</code>

:line_number_start2

<code class="ruby" start="50">.....</code>

:bold_every2

<code class="ruby" every="2">.....</code>

:highlight_lines2

<code class="ruby" highlight="1,3,5,7">.....</code>

title

<code class="ruby" title="/path/to/file.rb">.....</code>


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 1 (0 open — 1 closed)

Related to Redmine - Feature #3382: Ability to select only source code without line numbersClosedActions
Actions

Also available in: PDF Atom