diff options
author | http://jneen.net/ <jneen@jneen.net> | 2016-06-15 12:12:48 -0700 |
---|---|---|
committer | http://jneen.net/ <jneen@jneen.net> | 2016-07-14 10:08:15 -0700 |
commit | 55dc7d09b35c43679d0c298885c10aa59818bf66 (patch) | |
tree | 7603588cc246d09bdcf1913570303eec1249d301 | |
parent | 504a048b0824aecb81faa3ca4a9503a05c93faac (diff) | |
download | gitlab-ce-55dc7d09b35c43679d0c298885c10aa59818bf66.tar.gz |
trim more dead code
-rw-r--r-- | lib/rouge/formatters/html_gitlab.rb | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/lib/rouge/formatters/html_gitlab.rb b/lib/rouge/formatters/html_gitlab.rb index b76021eef77..791a9523884 100644 --- a/lib/rouge/formatters/html_gitlab.rb +++ b/lib/rouge/formatters/html_gitlab.rb @@ -57,10 +57,7 @@ module Rouge # Add leftover text rendered << current_line if current_line.present? - num_lines = rendered.size - numbers = (@linenostart..num_lines + @linenostart - 1).to_a - - { numbers: numbers, code: rendered } + { code: rendered } end def wrap_lines(lines) @@ -68,20 +65,8 @@ module Rouge lines = lines.each_with_index.map do |line, index| number = index + @linenostart - if @linenos == 'inline' - "<a name=\"L#{number}\"></a>" \ - "<span class=\"linenos\">#{number}</span>" \ - "<span id=\"#{@lineanchorsid}#{number}\" class=\"line\">#{line}" \ - '</span>' - else - "<span id=\"#{@lineanchorsid}#{number}\" class=\"line\">#{line}" \ - '</span>' - end - end - elsif @linenos == 'inline' - lines = lines.each_with_index.map do |line, index| - number = index + @linenostart - "<span class=\"linenos\">#{number}</span>#{line}" + "<span id=\"#{@lineanchorsid}#{number}\" class=\"line\">#{line}" \ + '</span>' end end |