[backend/libmfm] Improve custom emoji regex

This commit is contained in:
Laura Hausmann 2024-03-17 17:11:47 +01:00
parent 21580a3678
commit f5aa7f6ff6
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -457,7 +457,7 @@ internal class SilentLinkNodeParser : INodeParser
internal class EmojiCodeNodeParser : INodeParser internal class EmojiCodeNodeParser : INodeParser
{ {
private const string Char = ":"; private const string Char = ":";
private static readonly Regex Full = new("^[a-z0-9_+-]+$"); private static readonly Regex Full = new("^[^.@\\s]+$");
public bool IsValid(string buffer, int position) public bool IsValid(string buffer, int position)
{ {