Sha256: 7635dee909549b18fad46acfe4e396a40b439965fd1f0316bcf25afa8c3f77e9

Contents?: true

Size: 252 Bytes

Versions: 7

Compression:

Stored size: 252 Bytes

Contents

require 'redcloth'

AutoHtml.add_filter(:redcloth).with({}) do |text, options|
  result = RedCloth.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

7 entries across 7 versions & 2 rubygems

Version Path
marcosinger-auto_html-1.3.6 lib/auto_html/filters/redcloth.rb
auto_html-1.4.2 lib/auto_html/filters/redcloth.rb
auto_html-1.4.1 lib/auto_html/filters/redcloth.rb
auto_html-1.4.0 lib/auto_html/filters/redcloth.rb
auto_html-1.3.7 lib/auto_html/filters/redcloth.rb
auto_html-1.3.6 lib/auto_html/filters/redcloth.rb
auto_html-1.3.5 lib/auto_html/filters/redcloth.rb