The Real Grunfink (nprofile…73zh) Usernames with formatting characters in them, like @test_one_two@example.com are broken, because one get italicized. I patched this up on my instance, seems to be working well. Here's the patch: https://dreamscape.link/vault/public/debug/snac2/0004-Fix-markup-being-parsed-inside-user-IDs.patch
Here's the same patch in a code block, because why not :)
```patch
From a5888ee164437de3854e360178db0bedf5f0896a Mon Sep 17 00:00:00 2001
From: Red Rozenglass
Date: Tue, 25 Mar 2025 22:39:24 -0400
Subject: [PATCH 4/4] Fix markup being parsed inside user IDs
A user called @test_one_two@example.com would have
the "one" part of their name italicized with an
HTML element, which breaks the ID, and prevents them
from getting actually mentioned; they don't get the
message or the notification.
Added regex to split user IDs during the message
formatting stage. User ID segments do not match any
of the formatting rules, so they get copied as is,
fixing the issue.
format.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/format.c b/format.c
index 755aeb2..dc4c673 100644
a/format.c+++ b/format.c
@@ -91,6 +91,7 @@ static xsstr *formatline(const char line, xs_list attach)
/ split by markup /
xs *sm = xsregexsplit(line,
"("
+ "@" NOSPACE "|"
"[^]+`" "|"
"~~[^~]+~~" "|"
"\\*\\*?\\*?[^\\*]+\\*?\\*?\\*" "|"
--
2.39.5