mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
Mark code blocks with a special attribute and strip away links from them.
This commit is contained in:
@@ -62,6 +62,11 @@ enum AllUsersMentionAttribute: AttributedStringKey {
|
||||
static let name = "MXAllUsersMentionAttribute"
|
||||
}
|
||||
|
||||
enum CodeBlockAttribute: AttributedStringKey {
|
||||
typealias Value = Bool
|
||||
static let name = "MXCodeBlockAttribute"
|
||||
}
|
||||
|
||||
// periphery: ignore - required to make NSAttributedString to AttributedString conversion even if not used directly
|
||||
extension AttributeScopes {
|
||||
struct ElementXAttributes: AttributeScope {
|
||||
@@ -77,6 +82,8 @@ extension AttributeScopes {
|
||||
|
||||
let allUsersMention: AllUsersMentionAttribute
|
||||
|
||||
let codeBlock: CodeBlockAttribute
|
||||
|
||||
let swiftUI: SwiftUIAttributes
|
||||
let uiKit: UIKitAttributes
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user