Sha256: c4ee912d607ae5508c7f19514c6da03ce23843b8b08576ce4a8213dfd6699b35

Contents?: true

Size: 261 Bytes

Versions: 6

Compression:

Stored size: 261 Bytes

Contents

require 'rinku'
require 'rexml/document'

AutoHtml.add_filter(:link).with({}) do |text, options|
  attributes = Array(options).reject { |k,v| v.nil? }.map { |k, v| %{#{k}="#{REXML::Text::normalize(v)}"} }.join(' ')
  Rinku.auto_link(text, :all, attributes)
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
auto_html-1.5.1.1 lib/auto_html/filters/link.rb
auto_html-1.6.0 lib/auto_html/filters/link.rb
auto_html-1.5.3 lib/auto_html/filters/link.rb
auto_html-1.5.2 lib/auto_html/filters/link.rb
auto_html-1.5.1 lib/auto_html/filters/link.rb
auto_html-1.5.0 lib/auto_html/filters/link.rb