diaspora/lib/diaspora/markdownify/html.rb
Benjamin Neff 9171f6b5ef
Revert "Revert "Bump twitter-text""
Bump twitter-text on develop branch again

This reverts commit 15ff67499b.
2018-04-12 04:01:52 +02:00

17 lines
426 B
Ruby

# frozen_string_literal: true
module Diaspora
module Markdownify
class HTML < Redcarpet::Render::HTML
include ActionView::Helpers::TextHelper
def autolink link, type
Twitter::TwitterText::Autolink.auto_link_urls(
link,
url_target: "_blank",
link_attribute_block: lambda {|_, attr| attr[:rel] += " noopener noreferrer" }
)
end
end
end
end