mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
mentionsCompat: wrap each mention in an h-card span
This commit is contained in:
parent
ab17be219c
commit
2e38a7b9ec
1 changed files with 1 additions and 1 deletions
|
|
@ -172,7 +172,7 @@ function buildInlineRecipients(mentions: MastodonMention[]): string {
|
|||
|
||||
const elements = mentions.reduce<string[]>((acc, { url, username }) => {
|
||||
const name = nip19.BECH32_REGEX.test(username) ? username.substring(0, 8) : username;
|
||||
acc.push(`<a href="${url}" class="u-url mention" rel="ugc">@<span>${name}</span></a>`);
|
||||
acc.push(`<span class="h-card"><a class="u-url mention" href="${url}" rel="ugc">@<span>${name}</span></a></span>`);
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue