@@ -53,13 +53,8 @@ class PostViewCell: UITableViewCell
5353 fatalError("init(coder:) has not been implemented")
5454 }
5555
56− func createTextView(with text: String, _ isSelectable: Bool) -> UITextView
56+ func createTextView(with text: NSAttributedString, _ isSelectable: Bool) -> UITextView
5757 {
58− let markdownParser = MarkdownParser(font: UIFont.systemFont(ofSize: 16))
59− let markdown = text
60− markdownParser.enabledElements = .disabledAutomaticLink
61− markdownParser.code.textBackgroundColor = #colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)
62−
6358 let textView = UITextView()
6459 textView.isScrollEnabled = false
6560 textView.isEditable = false
@@ -69,24 +64,22 @@ class PostViewCell: UITableViewCell
6964 } else {
7065 textView.isUserInteractionEnabled = false
7166 }
72− textView.attributedText = markdownParser.parse(markdown)
67+
68+ textView.attributedText = text
7369 return textView
7470 }
7571
7672 var views: [UIView] = []
7773 var post: Model.Posts?
7874
79− func fill(with info: [Model.Attachments], _ isFullVersoin: Bool, post: Model.Posts)
75+ func fill(with info: NSAttributedString, _ isFullVersoin: Bool, post: Model.Posts)
8076 {
8177 self.post = post
8278 // important
8379 contentView.subviews.forEach({ $0.removeFromSuperview() })
8480
8581 views = []
86− for attachment in info
87− {
88− views.append(createTextView(with: attachment.markdown, isFullVersoin))
89− }
82+ views.append(createTextView(with: info, isFullVersoin))
9083
9184 nameLabel.setTitle("\(post.user?.firstName ?? "") \(post.user?.lastName ?? "")", for: .normal)
9285 nameLabel.addTarget(self, action: #selector(displayProfile), for: .touchUpInside)