Commit d625f652 authored by http://jneen.net/'s avatar http://jneen.net/

eliminate the final newline in <pre> blocks

parent 001b1ff3
......@@ -12,10 +12,14 @@ module Rouge
end
def stream(tokens, &b)
is_first = true
token_lines(tokens) do |line|
yield "\n" unless is_first
is_first = false
yield %<<span id="LC#{@line_number}" class="line">>
line.each { |token, value| yield span(token, value) }
yield %<</span>\n>
yield %<</span>>
@line_number += 1
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