Move parsing

This commit is contained in:
Andrew Hong 2023-07-13 04:41:53 -04:00
parent 403a7aa000
commit ea6704ca1d

View File

@ -256,9 +256,6 @@ namespace osu.Game.Online.Chat
private static MessageFormatterResult format(string toFormat, int startIndex = 0, int space = 3)
{
// see: https://github.com/ppy/osu/pull/24190
toFormat = Regex.Replace(toFormat, emoji_regex.ToString(), "[emoji]");
var result = new MessageFormatterResult(toFormat);
// handle the [link display] format
@ -282,6 +279,9 @@ namespace osu.Game.Online.Chat
// handle channels
handleMatches(channel_regex, "{0}", $@"{OsuGameBase.OSU_PROTOCOL}chan/{{0}}", result, startIndex, LinkAction.OpenChannel);
// see: https://github.com/ppy/osu/pull/24190
result.Text = Regex.Replace(result.Text, emoji_regex.ToString(), "[emoji]");
return result;
}