Skip to content

New lines are concatenated and not broken, need two lines #341

@freak4pc

Description

@freak4pc

Describe the bug
When I have a Markdown as follows:

Markdown(
    """
    Test1
    Test2
    Test3
    """
)

I get the following result:

image

If I add an extra line between them, they get separated:

To me, this seems like the wrong behavior, as you can see even from the markdown rendered here in GitHub:

Test1
Test2
Test3

Is there any way to fix it, or control this behavior?

Thanks :)

Checklist

  • I can reproduce this issue with a vanilla SwiftUI project.
  • I can reproduce this issue using the main branch of this package.
  • This bug hasn't been addressed in an existing GitHub issue.

Steps to reproduce
Shown in problem description

Expected behavior
Shown in problem description

Screenshots
Shown in problem description

Version information

  • MarkdownUI: [e.g. 2.0.0, or a commit hash]
  • OS: iOS 17.4
  • Xcode: 16 Beta 5

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions