Add `mention` and `hashtag` classes to hashtag anchors (#542)
This commit is contained in:
parent
74c4819ee2
commit
c94b54dde8
|
@ -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 New Issue