[backend/libmfm] Further improve mfm mentions parser

This commit is contained in:
Laura Hausmann 2024-02-26 20:24:56 +01:00
parent 5edcea3ab5
commit 341a4a8ee5
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -280,7 +280,7 @@ internal class HashtagNodeParser : INodeParser
internal class MentionNodeParser : INodeParser
{
private const string Pre = "@";
private static readonly Regex Post = new(@"[\s\),:]|$");
private static readonly Regex Post = new(@"[\s\),']|:(?:[^a-zA-Z]|)|$");
private static readonly Regex Full = new(@"^[a-zA-Z0-9._\-]+(?:@[a-zA-Z0-9._\-]+\.[a-zA-Z0-9._\-]+)?$");
private static readonly Regex Lookbehind = new(@"\s");