From ee67dcb9815599f8e4eacbba8054024feb94b523 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Thu, 24 Jul 2025 13:16:41 +0200 Subject: [PATCH] Disable list preprocessing on paste --- submodules/Pasteboard/Sources/Pasteboard.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/submodules/Pasteboard/Sources/Pasteboard.swift b/submodules/Pasteboard/Sources/Pasteboard.swift index fae2182d67..382ea4433a 100644 --- a/submodules/Pasteboard/Sources/Pasteboard.swift +++ b/submodules/Pasteboard/Sources/Pasteboard.swift @@ -220,10 +220,10 @@ private func indexToRoman(_ index: Int) -> String { } private func chatInputStateString(attributedString: NSAttributedString) -> NSAttributedString? { - let preprocessedString = preprocessLists(attributedString: attributedString) + //let preprocessedString = preprocessLists(attributedString: attributedString) - let string = NSMutableAttributedString(string: preprocessedString.string) - preprocessedString.enumerateAttributes(in: NSRange(location: 0, length: attributedString.length), options: [], using: { attributes, range, _ in + let string = NSMutableAttributedString(string: attributedString.string) + attributedString.enumerateAttributes(in: NSRange(location: 0, length: attributedString.length), options: [], using: { attributes, range, _ in if let value = attributes[.link], let url = (value as? URL)?.absoluteString { string.addAttribute(ChatTextInputAttributes.textUrl, value: ChatTextInputTextUrlAttribute(url: url), range: range) }