From bd7fde99af3df59c5ec96184b2649b4308250b24 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Tue, 10 Sep 2019 19:11:41 +0200 Subject: fixup Fix some warnings --- main/src/ui/util/helper.vala | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'main/src/ui/util/helper.vala') diff --git a/main/src/ui/util/helper.vala b/main/src/ui/util/helper.vala index c3353fb6..4e5fbb41 100644 --- a/main/src/ui/util/helper.vala +++ b/main/src/ui/util/helper.vala @@ -272,6 +272,14 @@ public int get_only_emoji_count(string markup_text) { return emoji_no; } +public string summarize_whitespaces_to_space(string s) { + try { + return (/\s+/).replace_literal(s, -1, 0, " "); + } catch (RegexError e) { + assert_not_reached(); + } +} + public bool use_csd() { return (GLib.Application.get_default() as Application).use_csd(); } -- cgit v1.2.3-54-g00ecf