preventing space if 0.

This commit is contained in:
Kevin G Christiano 2019-07-26 15:21:27 -04:00
parent 6dd7cab8f4
commit 64e6b8bbfe

View File

@ -243,7 +243,9 @@ public typealias ActionBlock = () -> Void
let imageAttachment = Label.getTextAttachmentImage(dimension: fontSize)
let mutableString = NSMutableAttributedString()
mutableString.append(NSAttributedString(string: " "))
if location != 0 {
mutableString.append(NSAttributedString(string: " "))
}
mutableString.append(NSAttributedString(attachment: imageAttachment))
attributedString.insert(mutableString, at: location)