BigW Consortium Gitlab

Commit 55dc7d09 by http://jneen.net/

trim more dead code

parent 504a048b
...@@ -57,10 +57,7 @@ module Rouge ...@@ -57,10 +57,7 @@ module Rouge
# Add leftover text # Add leftover text
rendered << current_line if current_line.present? rendered << current_line if current_line.present?
num_lines = rendered.size { code: rendered }
numbers = (@linenostart..num_lines + @linenostart - 1).to_a
{ numbers: numbers, code: rendered }
end end
def wrap_lines(lines) def wrap_lines(lines)
...@@ -68,20 +65,8 @@ module Rouge ...@@ -68,20 +65,8 @@ module Rouge
lines = lines.each_with_index.map do |line, index| lines = lines.each_with_index.map do |line, index|
number = index + @linenostart number = index + @linenostart
if @linenos == 'inline' "<span id=\"#{@lineanchorsid}#{number}\" class=\"line\">#{line}" \
"<a name=\"L#{number}\"></a>" \ '</span>'
"<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}"
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment