Formatting in marked.js for a marked down previewer

Tell us what’s happening:

Hi guys. So I still need some push to completing my marked react previewer but I have been battling with making sure the input outputs well in the previewer using the proper formatting text like \n and \r but so far it has not been totally successful. Most of the text input I want to set on a newline does not work even if I set it on a new line with \n and this has been frustrating. I have been looking for documentations to read to achieve near perfect formatting but I haven’t found any . At the moment I need guide on properly formatting the text in my editor so that it can appear well as it should in the previewer. My codepen on the work so far is below. Looking forward to responses. thanks.

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36.

Link to the challenge:

I guess I’m not understanding. You mean in the markdown text? Things like \r are not part of the markdown specification. They should just render as \r in the editor and previewer.

Do you mean in the text of the app? If so, can you give an example of something that is not looking the way you want and how you want it to look.

response time was so late I had to help myself. Turns out that \r is for return carriage while \n is for new line.