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
\n Doesn't work properly #818
Comments
Please provide minimal but runnable online reproduction. |
https://stackblitz.com/edit/github-mmihct?file=src%2Fapp.tsx |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Welcome @sash20m! 👋 As @JounQin mentioned that is how markdown works. |
As @JounQin stated, this is how markdown works. I don’t recommend it, but if you insist on turning single newlines into line breaks, you can use |
I was under the impression its relation to \n is the same as any string. I have a long text with \n's and react-markdown fails to add new lines properly to the component. I'll look at the plugin mentioned above, thank you. |
Initial checklist
Affected packages and versions
^9.0.1
Link to runnable example
https://stackblitz.com/edit/github-mmihct?file=src%2Fapp.tsx
Steps to reproduce
Install react-markdown and add as mardown the string "abc\nabc" or any other with the \n. It only makes a blank space between the words. If I added two \n then there will be a new line, but if I added 3 or 4 \n, also it remains only at one new lines.
I tried it in a fresh react app, and implemented it exactly as said in docs.
The text was updated successfully, but these errors were encountered: