mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Fix inline code being rendered as blocks. (#5017)
* Fix inline code being rendered as blocks. And make blocks non-greedy as well as only scrolling when needed. * Rename the bubble layout priorities. * Add an InlineCode attribute so that the builder also strips links from these too. * Split up the snapshot tests into individual cases. This should make it much easier to see *what* has changed when regenerating.
This commit is contained in:
@@ -68,6 +68,11 @@ enum CodeBlockAttribute: AttributedStringKey {
|
||||
static let name = "MXCodeBlockAttribute"
|
||||
}
|
||||
|
||||
enum InlineCodeAttribute: AttributedStringKey {
|
||||
typealias Value = Bool
|
||||
static let name = "MXInlineCodeAttribute"
|
||||
}
|
||||
|
||||
// periphery: ignore - required to make NSAttributedString to AttributedString conversion even if not used directly
|
||||
extension AttributeScopes {
|
||||
struct ElementXAttributes: AttributeScope {
|
||||
@@ -84,6 +89,7 @@ extension AttributeScopes {
|
||||
let allUsersMention: AllUsersMentionAttribute
|
||||
|
||||
let codeBlock: CodeBlockAttribute
|
||||
let inlineCode: InlineCodeAttribute
|
||||
|
||||
let swiftUI: SwiftUIAttributes
|
||||
let uiKit: UIKitAttributes
|
||||
|
||||
Reference in New Issue
Block a user