Open gerrylu1 opened 6 months ago
Thank you for contributing to MarkdownUI!
Before you submit an issue, please complete the report with all the relevant details for your bug and go through every item in the checklist.
Describe the bug As the title suggests, this is a word-wrapping issue.
Checklist
main
Steps to reproduce Please refer to the code here:
import SwiftUI import MarkdownUI struct MarkdownTestView: View { private var screenWidth: CGFloat { UIScreen.main.bounds.width } private var markdownText = "This shipment has been been delivered." var body: some View { VStack(spacing: 8) { HStack(alignment: .bottom, spacing: 8) { markdownMessageView } HStack { markdownMessageView } ZStack { HStack{ Spacer() } Markdown{ """ ## Using a Markdown Content Builder Use Markdown strings or an expressive domain-specific language to build the content. This shipment has been been delivered. """ Heading(.level2) { "Try MarkdownUI" } Paragraph { Strong("MarkdownUI") " is a native Markdown renderer for SwiftUI" " compatible with the " InlineLink( "GitHub Flavored Markdown Spec", destination: URL(string: "https://github.github.com/gfm/")! ) "." } } } .padding(12) .background( RoundedRectangle(cornerRadius: 12, style: .continuous) .foregroundColor(Color.secondary.opacity(0.2)) ) } .padding(.trailing, screenWidth * 0.2) } private var markdownMessageView: some View { HStack { Markdown { markdownText } .multilineTextAlignment(.leading) .padding(12) .background(Color.red) Spacer() } .background( RoundedRectangle(cornerRadius: 12, style: .continuous) .foregroundColor(Color.secondary.opacity(0.2)) ) } }
Expected behavior The repeated word "been" should have stayed in the line above since there was still space for the word.
Screenshots If applicable, add screenshots to help explain your problem.
Version information
Thank you for contributing to MarkdownUI!
Before you submit an issue, please complete the report with all the relevant details for your bug and go through every item in the checklist.
Describe the bug As the title suggests, this is a word-wrapping issue.
Checklist
main
branch of this package.Steps to reproduce Please refer to the code here:
Expected behavior The repeated word "been" should have stayed in the line above since there was still space for the word.
Screenshots If applicable, add screenshots to help explain your problem.
Version information