Skip to content

Commit

Permalink
Fix spacing after images
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalezreal committed Jan 8, 2021
1 parent 1b23032 commit cce6468
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Sources/MarkdownUI/Shared/AttributedStringRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,15 @@ private extension AttributedStringRenderer {
guard let attachment = attachments[url] else {
return NSAttributedString()
}
return NSAttributedString(attachment: attachment)

let result = NSMutableAttributedString(attachment: attachment)

result.addAttributes(
state.attributes,
range: NSRange(location: 0, length: result.length)
)

return result
#endif
}
}
Expand Down

0 comments on commit cce6468

Please sign in to comment.