summary refs log tree commit diff
path: root/extra/admin-api/Utilities/Spacebar.Client/Components/ChannelMessageList.razor.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-05-17 03:14:34 +0200
committerRory& <root@rory.gay>2026-05-17 03:14:34 +0200
commit8f76cc5edf8588c8bec36daf0bbdc7d699d38800 (patch)
treed84535fa9d66a674ed652d0b7d5e6cb4865ba7ac /extra/admin-api/Utilities/Spacebar.Client/Components/ChannelMessageList.razor.cs
parentAdd WIP client (diff)
downloadserver-ts-8f76cc5edf8588c8bec36daf0bbdc7d699d38800.tar.xz
client: basic message parsing, gateway listening
Diffstat (limited to 'extra/admin-api/Utilities/Spacebar.Client/Components/ChannelMessageList.razor.cs')
-rw-r--r--extra/admin-api/Utilities/Spacebar.Client/Components/ChannelMessageList.razor.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/extra/admin-api/Utilities/Spacebar.Client/Components/ChannelMessageList.razor.cs b/extra/admin-api/Utilities/Spacebar.Client/Components/ChannelMessageList.razor.cs
new file mode 100644

index 000000000..c1121f9b7 --- /dev/null +++ b/extra/admin-api/Utilities/Spacebar.Client/Components/ChannelMessageList.razor.cs
@@ -0,0 +1,30 @@ +using System.Text.RegularExpressions; + +namespace Spacebar.Client.Components; + +public partial class ChannelMessageList { + [GeneratedRegex(@"\*\*(.*)\*\*")] + private static partial Regex MarkdownBoldRegex { get; } + + [GeneratedRegex(@"\*(.*)\*")] + private static partial Regex MarkdownItalicRegex { get; } + + [GeneratedRegex(@"```((?<lang>.*)\n)(?<content>.*)```")] + private static partial Regex MarkdownCodeblockRegex { get; } + + [GeneratedRegex(@"``?(.*)`?`")] + private static partial Regex MarkdownCodeRegex { get; } + + [GeneratedRegex(@"<#(\d*)>")] + private static partial Regex MarkdownChannelMentionRegex { get; } + + [GeneratedRegex(@"<@(\d*)>")] + private static partial Regex MarkdownUserMentionRegex { get; } + + [GeneratedRegex(@"<@&(\d*)>")] + private static partial Regex MarkdownRoleMentionRegex { get; } + + [GeneratedRegex(@"<:(?<name>[a-zA-Z0-9]*?):(?<emojiId>\d*>)")] + private static partial Regex MarkdownEmojiMentionRegex { get; } + +} \ No newline at end of file