Markdown Previewer - Optional bonus

Hello !

Can you help me with the last User story of the Markdown Previewer project ( from the Front End Development Libraries Certification):
→ OPTIONAL BONUS (you do not need to make this test pass): My markdown previewer interprets carriage returns and renders them as
(line break) elements (HINT: read the Marked.js docs for this one!).

I read the documentation and I think that what I have to use is the option breaks and to set it to true but I don’t know how to do this. Here is the link to my codepen : codepen

I tried many solutions I found in this forum but it didn’t work with my code. Thank you a lot for your help :grinning:

Hello! Welcome to the community :tada:!

That’s because you’re using react-markdown instead of the marked.js library.

There’s a difference between a component (react-markdown) and a library (marked).

The good thing, however, is that the component you chose is interpreting the line breaks.

Try to implement the same with marked instead :slight_smile:.


This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.