mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-25 00:30:59 +00:00
Add mention
and hashtag
classes to hashtag anchors (#542)
This commit is contained in:
parent
74c4819ee2
commit
c94b54dde8
1 changed files with 1 additions and 1 deletions
|
@ -205,7 +205,7 @@ class FediverseHtmlParser(HTMLParser):
|
|||
hashtag = hashtag.lstrip("#")
|
||||
self.hashtags.add(hashtag.lower())
|
||||
if self.uri_domain:
|
||||
return f'<a href="https://{self.uri_domain}/tags/{hashtag.lower()}/" rel="tag">#{hashtag}</a>'
|
||||
return f'<a href="https://{self.uri_domain}/tags/{hashtag.lower()}/" class="mention hashtag" rel="tag">#{hashtag}</a>'
|
||||
else:
|
||||
return f'<a href="/tags/{hashtag.lower()}/" rel="tag">#{hashtag}</a>'
|
||||
|
||||
|
|
Loading…
Reference in a new issue