mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Horizontally scrollable code blocks (#5001)
* Remove attributed string backed codeblock background color * Add code block support to attributed string componentization * Render code blocks within their own custom horizontal scroll view within the timeline * Update preview test snapshots * Introduce a attributed string component type instead of a 2 different booleans.
This commit is contained in:
@@ -9,9 +9,15 @@
|
||||
import Foundation
|
||||
|
||||
struct AttributedStringBuilderComponent: Hashable, Identifiable {
|
||||
enum ComponentType {
|
||||
case plainText
|
||||
case blockquote
|
||||
case codeBlock
|
||||
}
|
||||
|
||||
let id: String
|
||||
let attributedString: AttributedString
|
||||
let isBlockquote: Bool
|
||||
let type: ComponentType
|
||||
}
|
||||
|
||||
protocol AttributedStringBuilderProtocol {
|
||||
|
||||
Reference in New Issue
Block a user