0
0
Fork 0

Adding hashtags

This commit is contained in:
Eugen Rochko 2016-11-05 15:20:05 +01:00
parent 62292797ec
commit 48b9619439
33 changed files with 305 additions and 62 deletions

View file

@ -2,6 +2,7 @@ require 'singleton'
class Formatter
include Singleton
include RoutingHelper
include ActionView::Helpers::TextHelper
include ActionView::Helpers::SanitizeHelper
@ -52,7 +53,7 @@ class Formatter
def hashtag_html(match)
prefix, affix = match.split('#')
"#{prefix}<a href=\"#\" class=\"mention hashtag\">#<span>#{affix}</span></a>"
"#{prefix}<a href=\"#{tag_url(affix.downcase)}\" class=\"mention hashtag\">#<span>#{affix}</span></a>"
end
def mention_html(match, account)