Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link break not left in HTML for Markdown component #1430

Open
sjdeak opened this issue Apr 25, 2024 · 3 comments
Open

Link break not left in HTML for Markdown component #1430

sjdeak opened this issue Apr 25, 2024 · 3 comments

Comments

@sjdeak
Copy link

sjdeak commented Apr 25, 2024

Describe the Bug

I am reaching out regarding the use of markdown components. I have encountered an issue , Despite including double line breaks in my text, the actual line break is not displayed in the HTML output.

Could you please provide guidance on how to effectively create line breaks between inputs using markdown components? Any assistance or insights on resolving this matter would be greatly appreciated.

Input

<Markdown>
line1

line2
</Markdown>

Output HTML
<p>line1 line2</p>

Which package is affected (leave empty if unsure)

No response

Link to the code that reproduces this issue

Please see the code snippet above

To Reproduce

Please see the code snippet above

Expected Behavior

Output HTML

<p>line1</p>
<p>line2</p>

What's your node version? (if relevant)

v20.11.1

@sjdeak sjdeak added the Type: Bug Confirmed bug label Apr 25, 2024
@BHARATHI-GIT-HUB

This comment was marked as spam.

@sjdeak
Copy link
Author

sjdeak commented May 20, 2024

thanks! I figured out I shouldn't directly type markdown text in the tag, but should wrap them in a string, so that line breaks will not be remove by jsx compiler.

<Markdown>
{`Line 1

Line2`}
</Markdown>

@sjdeak sjdeak closed this as completed May 20, 2024
@gabrielmfern
Copy link
Collaborator

IMO this is still a bug, harms the experience for the user, so I'll keep it open for now @sjdeak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants