You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a whitespace collapsing bug where inline-styled elements (links, bold, italic, strikethrough) lose their trailing spaces in .lineBreak mode, causing adjacent text to run together without proper spacing.
Checklist
I can reproduce this issue with a vanilla SwiftUI project.
I can reproduce this issue using the main branch of this package.
structContentView:View{varbody:someView{VStack{Markdown{"""Begining text[Link](https://www.example.com) without spaces after?**Emphasis Text** seems to run together ?***what*** about strong emphasis?~~strikethrough~~ are also running running together!`inline code` is not working?"""}.markdownSoftBreakMode(.lineBreak)}.padding().frame(height:200)}}
Expected behavior
The whitespace between the text and inline-styled elements should be preserved.
Screenshots
Version information
MarkdownUI: [2.4.1]
OS: [macOS 15]
Xcode: [16.2]
The text was updated successfully, but these errors were encountered:
hyperlink
added a commit
to hyperlink/MarkdownUI
that referenced
this issue
Apr 10, 2025
When using .markdownSoftBreakMode(.lineBreak), trailing spaces after
inline-styled elements (links, bold, italic, strikethrough, inline code)
were being collapsed, causing adjacent text to run together without
proper spacing. This commit ensures whitespace is properly preserved
in these contexts.
Fixesgonzalezreal#402
There's a whitespace collapsing bug where inline-styled elements (links, bold, italic, strikethrough) lose their trailing spaces in .lineBreak mode, causing adjacent text to run together without proper spacing.
Checklist
main
branch of this package.Steps to reproduce
.markdownSoftBreakMode(.lineBreak)
Expected behavior
The whitespace between the text and inline-styled elements should be preserved.
Screenshots
Version information
The text was updated successfully, but these errors were encountered: