Add "mention" and "hashtag" class names to anchor tags
Mastodon currently adds "mention" and "hashtag" class names to indicate anchors that refer to accounts or tags. Clients may use this to do special processing for these kind of anchors, e.g. to re-route it to an internal UI-specific view of that account or tag (example).
Without these class names, it's a bit difficult to do this processing, as you either have to rely on convention (e.g. /tag/foo
) or the status.mentions
member (there seems to be no status.tags
member unless I'm mistaken). Also, adding these class names would improve compatibility with clients that were implemented with Mastodon in mind. (E.g. see https://github.com/nolanlawson/pinafore/issues/832)