mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 03:04:28 +00:00
Tweak mention format to show the full handle
This commit is contained in:
parent
0696268d0b
commit
81c2ef8961
2 changed files with 6 additions and 1 deletions
|
@ -61,7 +61,7 @@ async def _mentionify(
|
|||
mentioned_actors.append(actor)
|
||||
tags.append(dict(type="Mention", href=actor.ap_id, name=mention))
|
||||
|
||||
link = f'<span class="h-card"><a href="{actor.url}" class="u-url mention">@{username}</a></span>' # noqa: E501
|
||||
link = f'<span class="h-card"><a href="{actor.url}" class="u-url mention">{actor.handle}</a></span>' # noqa: E501
|
||||
content = content.replace(mention, link)
|
||||
return content, tags, mentioned_actors
|
||||
|
||||
|
|
|
@ -177,6 +177,11 @@ ALLOWED_TAGS = [
|
|||
]
|
||||
|
||||
ALLOWED_CSS_CLASSES = [
|
||||
# microformats
|
||||
"h-card",
|
||||
"u-url",
|
||||
"mention",
|
||||
# code highlighting
|
||||
"highlight",
|
||||
"codehilite",
|
||||
"hll",
|
||||
|
|
Loading…
Reference in a new issue