mild changes.
This commit is contained in:
parent
16c644e12d
commit
bd69d9fb89
@ -368,7 +368,7 @@ public typealias CoreObjectActionLoadPresentDelegate = MVMCoreActionDelegateProt
|
||||
var rangeArray = [AnyHashable]()
|
||||
|
||||
for subString in words ?? [] {
|
||||
let finalSubString = subString + (" ")
|
||||
let finalSubString = subString + " "
|
||||
let wordIndex: Int = index
|
||||
let length: Int = finalSubString.count
|
||||
let subStringRange = NSRange(location: wordIndex, length: length)
|
||||
@ -407,7 +407,7 @@ public typealias CoreObjectActionLoadPresentDelegate = MVMCoreActionDelegateProt
|
||||
frontText = actionRange.revisedText
|
||||
|
||||
if let revisedText = actionRange.revisedText, let startBraceIndex = actionRange.startIndex, let endBraceIndex = actionRange.endIndex {
|
||||
// TODO: Put some of this into a String Extension in MVMCore
|
||||
|
||||
frontText = String(revisedText[revisedText.startIndex..<startBraceIndex]).trimmingCharacters(in: .whitespaces)
|
||||
actionText = String(revisedText[startBraceIndex..<endBraceIndex]).trimmingCharacters(in: .whitespaces)
|
||||
backText = String(revisedText[endBraceIndex...]).trimmingCharacters(in: .whitespaces)
|
||||
@ -431,7 +431,6 @@ public typealias CoreObjectActionLoadPresentDelegate = MVMCoreActionDelegateProt
|
||||
fullText = fullText.replacingOccurrences(of: rightBrace, with: "")
|
||||
}
|
||||
|
||||
|
||||
actionRange.revisedText = fullText
|
||||
return actionRange
|
||||
}
|
||||
@ -461,7 +460,7 @@ public typealias CoreObjectActionLoadPresentDelegate = MVMCoreActionDelegateProt
|
||||
|
||||
// Reset the front text, back text, action map
|
||||
@objc public func setFrontAttributedText(_ frontAttributedText: NSAttributedString?, actionMap: [AnyHashable: Any]?, backAttributedText: NSAttributedString?, additionalData: [AnyHashable: Any]?, delegate: ActionObjectDelegate?) {
|
||||
|
||||
|
||||
setFrontAttributedText(frontAttributedText, actionMap: actionMap, backAttributedText: backAttributedText, addNewLine: false, additionalData: additionalData, delegate: delegate)
|
||||
}
|
||||
|
||||
@ -616,8 +615,6 @@ extension LabelWithInternalButton: MVMCoreUIMoleculeViewProtocol {
|
||||
self.actionText = actionText
|
||||
}
|
||||
|
||||
//public var actionBlock: ActionBlock?
|
||||
|
||||
// Want this to be last because it has a willSet feature.
|
||||
if let text = dictionary["text"] as? String {
|
||||
self.text = text
|
||||
|
||||
Loading…
Reference in New Issue
Block a user