lib/active_copy/renderer.rb in active_copy-1.0.0.pre vs lib/active_copy/renderer.rb in active_copy-1.0.0
- old
+ new
@@ -1,13 +1,10 @@
-require 'pygments'
require 'redcarpet'
+require 'pygments'
module ActiveCopy
class Renderer < Redcarpet::Render::HTML
- def block_code(raw_code, language)
- code = "\n#{raw_code.strip}"
- #Rails.logger.info "Rendered highlighted #{language} code block"
- #Pygments.highlight code, lexer: language
- "<pre>#{code}\n</pre>"
+ def block_code(text, language)
+ Pygments.highlight text, lexer: language
end
end
end