ForceMentionsInContent: wrap mentions in a span, fix the formatting
I am going to allow users to use ForceMentionsInContent
MRF with Soapbox and then strip the mentions client-side. I wrapped the inlined mentions with a <span class="recipients-inline">
tag.
However, I noticed the formatting was quite off:
I properly formatted the mentions.
I also noticed it didn't work with local posts. The tag
array was empty, even though to
had recipients. The to
array was also in the correct order. So I rewrote/simplified the code around the to
field instead of tag
. I think it will be higher performance, even if it excludes some users in rare cases.
Afterwards it works pretty well: