Mark code blocks with a special attribute and strip away links from them.

This commit is contained in:
Stefan Ceriu
2025-09-09 13:59:06 +03:00
committed by Doug
parent 69894ece62
commit 9bbff69c69
5 changed files with 24 additions and 26 deletions

View File

@@ -31,6 +31,7 @@ extension NSAttributedString.Key {
static let MatrixEventOnRoomID: NSAttributedString.Key = .init(rawValue: EventOnRoomIDAttribute.name)
static let MatrixEventOnRoomAlias: NSAttributedString.Key = .init(rawValue: EventOnRoomAliasAttribute.name)
static let MatrixAllUsersMention: NSAttributedString.Key = .init(rawValue: AllUsersMentionAttribute.name)
static let CodeBlock: NSAttributedString.Key = .init(rawValue: CodeBlockAttribute.name)
}
struct AttributedStringBuilder: AttributedStringBuilderProtocol {