mirror of
https://github.com/kikobar/mastodon.git
synced 2024-11-17 21:04:14 +00:00
This commit fixes hashtag_html so it correctly handles matches with multiple hash-signs. Bug located by @over9001, initial fix suggested by @nightpool.
This commit is contained in:
parent
78af88e1f4
commit
5c9aa2b732
|
@ -109,7 +109,7 @@ class Formatter
|
||||||
end
|
end
|
||||||
|
|
||||||
def hashtag_html(match)
|
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>"
|
"#{prefix}<a href=\"#{tag_url(affix.downcase)}\" class=\"mention hashtag\">#<span>#{affix}</span></a>"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue