Commit 55dc7d09 authored by http://jneen.net/'s avatar 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,22 +65,10 @@ module Rouge ...@@ -68,22 +65,10 @@ 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'
"<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 id=\"#{@lineanchorsid}#{number}\" class=\"line\">#{line}" \
'</span>' '</span>'
end end
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
lines.join("\n") lines.join("\n")
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