Class: Diaspora::Markdownify::HTML

Inherits:
Redcarpet::Render::HTML
  • Object
show all
Includes:
ActionView::Helpers::TextHelper
Defined in:
lib/diaspora/markdownify/html.rb

Instance Method Summary collapse

Instance Method Details


8
9
10
11
12
13
14
# File 'lib/diaspora/markdownify/html.rb', line 8

def autolink link, type
  Twitter::TwitterText::Autolink.auto_link_urls(
    link,
    url_target:           "_blank",
    link_attribute_block: lambda {|_, attr| attr[:rel] += " noopener noreferrer" }
  )
end