wblog/lib/markdown.rb

11 lines
239 B
Ruby
Raw Normal View History

2014-03-30 14:01:54 +08:00
require 'rouge'
require 'rouge/plugins/redcarpet'
class CodeHTML < Redcarpet::Render::HTML
include Rouge::Plugins::Redcarpet
2014-04-01 18:15:57 +08:00
def initialize(extensions = {})
super extensions.merge(link_attributes: { target: "_blank" })
end
2014-03-30 14:01:54 +08:00
end