logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 5c9aa2b7329fe5bd87cee583e33c7b5c1eac4566
parent: 78af88e1f4389b821815316f03a27be1b55e61da
Author: Mingye Wang <arthur200126@gmail.com>
Date:   Fri, 21 Apr 2017 12:18:58 -0400

Fix mangling of ##tag matches (#2194) (#2247)

This commit fixes hashtag_html so it correctly handles matches with multiple hash-signs.

Bug located by @over9001, initial fix suggested by @nightpool.

Diffstat:

Mapp/lib/formatter.rb2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb @@ -109,7 +109,7 @@ class Formatter end def hashtag_html(match) - prefix, affix = match.split('#') + prefix, _, affix = match.rpartition('#') "#{prefix}<a href=\"#{tag_url(affix.downcase)}\" class=\"mention hashtag\">#<span>#{affix}</span></a>" end