From: vitopigno <103512727+VitusVeit@users.noreply.github.com> Date: Thu, 12 Jun 2025 15:20:50 +0000 (+0200) Subject: Merge branch 'master' into fix_highlight X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=ddefcbe1477f28cb2c3ba17cfb67fdf8d871a470;p=space-station-14.git Merge branch 'master' into fix_highlight --- ddefcbe1477f28cb2c3ba17cfb67fdf8d871a470 diff --cc Content.Client/UserInterface/Systems/Chat/ChatUIController.Highlighting.cs index 809713ddf7,1670823aab..dd73e3dd66 --- a/Content.Client/UserInterface/Systems/Chat/ChatUIController.Highlighting.cs +++ b/Content.Client/UserInterface/Systems/Chat/ChatUIController.Highlighting.cs @@@ -102,18 -107,17 +107,18 @@@ public sealed partial class ChatUIContr // that make sure the words to match are separated by spaces or punctuation. // NOTE: The reason why we don't use \b tags is that \b doesn't match reverse slash characters "\" so // a pre-sanitized (see 1.) string like "\[test]" wouldn't get picked up by the \b. - if (keyword.Count(c => (c == '"')) > 0) + if (keyword.Any(c => c == '"')) { // Matches the last double quote character. - keyword = Regex.Replace(keyword, "\"$", "(?!\\w)"); + keyword = StartDoubleQuote.Replace(keyword, "(?!\\w)"); // When matching for the first double quote character we also consider the possibility // of the double quote being preceded by a @ character. - keyword = Regex.Replace(keyword, "^\"|(?<=^@)\"", "(?