mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:06:00 +00:00
Fixed text attributes missing from blockquote components. Added more tests.
This commit is contained in:
@@ -100,9 +100,9 @@ struct AttributedStringBuilder: AttributedStringBuilderProtocol {
|
||||
var attributedString = AttributedString(attributedString[range])
|
||||
|
||||
// Remove trailing new lines if any
|
||||
if let lastCharacter = attributedString.characters.last,
|
||||
lastCharacter.isNewline {
|
||||
attributedString = AttributedString(attributedString.characters.dropLast())
|
||||
if attributedString.characters.last?.isNewline ?? false,
|
||||
let range = attributedString.range(of: "\n", options: .backwards, locale: nil) {
|
||||
attributedString.removeSubrange(range)
|
||||
}
|
||||
|
||||
return AttributedStringBuilderComponent(attributedString: attributedString, isBlockquote: value != nil)
|
||||
|
||||
Reference in New Issue
Block a user