Skip to content

Commit

Permalink
swap in rails autolink
Browse files Browse the repository at this point in the history
  • Loading branch information
pehrlich committed Mar 11, 2012
1 parent a6acc49 commit 4d10c47
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions auto_html.gemspec
Expand Up @@ -12,6 +12,7 @@ Gem::Specification.new do |gem|

#gem.add_dependency('rinku', '~> 1.5.0')
#gem.add_dependency('redcarpet', '~> 2.0.0')
gem.add_dependency('rails_autolink')

# ensure the gem is built out of versioned files
gem.files = Dir['Rakefile', '{bin,lib,man,test,spec}/**/*',
Expand Down
13 changes: 6 additions & 7 deletions lib/auto_html/filters/link.rb
@@ -1,7 +1,6 @@
#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
require 'rails_autolink'

AutoHtml.add_filter(:link).with({}) do |text, options|
include ActionView::Helpers::TextHelper
auto_link(text, :all, options)
end

0 comments on commit 4d10c47

Please sign in to comment.