文章内链接自动添加 _blank
This commit is contained in:
parent
c6da3ea7dc
commit
0fbc18ec9e
|
@ -3,4 +3,8 @@ require 'rouge/plugins/redcarpet'
|
|||
|
||||
class CodeHTML < Redcarpet::Render::HTML
|
||||
include Rouge::Plugins::Redcarpet
|
||||
|
||||
def initialize(extensions = {})
|
||||
super extensions.merge(link_attributes: { target: "_blank" })
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue