diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-08-03 18:51:19 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-08-03 18:51:19 +1000 |
commit | 20de634a06c0053aad4b1a0017cae4ed023b6e94 (patch) | |
tree | ac4903dde869091aacf03a151811f8a4c0d84f5a /source/core/StarText.cpp | |
parent | bef86811c9a08711b45523193b2ac7c13850f8c6 (diff) |
Improve Discord activity info
requested by Omeruin!
Diffstat (limited to 'source/core/StarText.cpp')
-rw-r--r-- | source/core/StarText.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/core/StarText.cpp b/source/core/StarText.cpp index d507fd4..749fd90 100644 --- a/source/core/StarText.cpp +++ b/source/core/StarText.cpp @@ -36,6 +36,8 @@ namespace Text { static auto stripEscapeRegex = std::regex(strf("\\{:c}[^;]*{:c}", CmdEsc, EndEsc)); String stripEscapeCodes(String const& s) { + if (s.empty()) + return s; return std::regex_replace(s.utf8(), stripEscapeRegex, ""); } |