Skip to content

Commit cce6468

Browse files
committed
Fix spacing after images
1 parent 1b23032 commit cce6468

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Sources/MarkdownUI/Shared/AttributedStringRenderer.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,15 @@ private extension AttributedStringRenderer {
232232
guard let attachment = attachments[url] else {
233233
return NSAttributedString()
234234
}
235-
return NSAttributedString(attachment: attachment)
235+
236+
let result = NSMutableAttributedString(attachment: attachment)
237+
238+
result.addAttributes(
239+
state.attributes,
240+
range: NSRange(location: 0, length: result.length)
241+
)
242+
243+
return result
236244
#endif
237245
}
238246
}

0 commit comments

Comments
 (0)