Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core/StarText.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-08-03 18:51:19 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2024-08-03 18:51:19 +1000
commit20de634a06c0053aad4b1a0017cae4ed023b6e94 (patch)
treeac4903dde869091aacf03a151811f8a4c0d84f5a /source/core/StarText.cpp
parentbef86811c9a08711b45523193b2ac7c13850f8c6 (diff)
Improve Discord activity info
requested by Omeruin!
Diffstat (limited to 'source/core/StarText.cpp')
-rw-r--r--source/core/StarText.cpp2
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, "");
}