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

summaryrefslogtreecommitdiff
path: root/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'source/core')
-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, "");
}