Sha256: 6989097c3bccb1036b7b7a71d485a42ff17e75107640febb5baedeefef328a83
Contents?: true
Size: 255 Bytes
Versions: 2
Compression:
Stored size: 255 Bytes
Contents
require 'redcarpet' AutoHtml.add_filter(:redcarpet).with({}) do |text, options| result = Redcarpet.new(text).to_html if options and options[:target] and options[:target].to_sym == :_blank result.gsub!(/<a/,'<a target="_blank"') end result end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
marcosinger-auto_html-1.3.6 | lib/auto_html/filters/redcarpet.rb |
auto_html-1.4.2 | lib/auto_html/filters/redcarpet.rb |