From e9e0829cdc9fb9f27e5507640d2627f3bfb89b05 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Fri, 15 May 2020 22:15:52 +0200 Subject: [PATCH] Remove end dash from title --- src/core/utilities.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/utilities.cpp b/src/core/utilities.cpp index b66e7a4f0..22fe61924 100644 --- a/src/core/utilities.cpp +++ b/src/core/utilities.cpp @@ -930,6 +930,9 @@ QString ReplaceMessage(const QString &message, const Song &song, const QString & pos += variable_replacer.matchedLength(); } + int index_of = copy.indexOf(QRegExp(" - (>|$)")); + if (index_of >= 0) copy = copy.remove(index_of, 3); + return copy; }