diff --git a/app/models/user.rb b/app/models/user.rb index 5e32b1d..5833cc1 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -346,9 +346,7 @@ class User < ActiveRecord::Base end def linkified_about - # most users are probably mentioning "@username" to mean a twitter url, not - # a link to a profile on this site - Markdowner.to_html(self.about, { :disable_profile_links => true }) + Markdowner.to_html(self.about) end def most_common_story_tag diff --git a/extras/markdowner.rb b/extras/markdowner.rb index ca67d06..1be448a 100644 --- a/extras/markdowner.rb +++ b/extras/markdowner.rb @@ -1,6 +1,5 @@ class Markdowner # opts[:allow_images] allows tags - # opts[:disable_profile_links] disables @username -> /u/username links def self.to_html(text, opts = {}) if text.blank? @@ -10,9 +9,7 @@ class Markdowner exts = [:tagfilter, :autolink, :strikethrough] root = CommonMarker.render_doc(text.to_s, [:SMART], exts) - unless opts[:disable_profile_links] - walk_text_nodes(root) {|n| postprocess_text_node(n)} - end + walk_text_nodes(root){|n| postprocess_text_node(n) } ng = Nokogiri::HTML(root.to_html([:SAFE], exts))