diff --git a/MVMCoreUI/Atoms/Views/LabelWithInternalButton.swift b/MVMCoreUI/Atoms/Views/LabelWithInternalButton.swift index a827c40d..42661311 100644 --- a/MVMCoreUI/Atoms/Views/LabelWithInternalButton.swift +++ b/MVMCoreUI/Atoms/Views/LabelWithInternalButton.swift @@ -384,9 +384,9 @@ public typealias CoreObjectActionLoadPresentDelegate = MVMCoreActionDelegateProt let actionableTuple: ActionableStringTuple = rangeOfText(text, startTag: startTag, endTag: endTag) if let front = actionableTuple.front, let middle = actionableTuple.middle, let end = actionableTuple.end { - frontText = front - actionText = middle - backText = end + frontText = front.trimmingCharacters(in: .whitespaces) + actionText = middle.trimmingCharacters(in: .whitespaces) + backText = end.trimmingCharacters(in: .whitespaces) self.text = getTextFromStringComponents() } else { frontText = text @@ -408,7 +408,6 @@ public typealias CoreObjectActionLoadPresentDelegate = MVMCoreActionDelegateProt actionableTuple.front = firstHalf.first if let rightTag = endTag, text.contains(rightTag) { - let secondHalf = firstHalf[1].components(separatedBy: rightTag) actionableTuple.middle = secondHalf[0] actionableTuple.end = secondHalf[1]