Front End Development Libraries Projects - Build a Markdown Previewer

Tell us what’s happening:

Locally i got my web app running and the markdown works (with npm install marked) but when I try to run the tests in codepen it doesn’t work. I dont really see where the problem is in my case.

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0

Challenge Information:

Front End Development Libraries Projects - Build a Markdown Previewer

Did you pass this in the challenge because it only requires a link. Also click the button and check the error report for the last one.

7. OPTIONAL BONUS (you do not need to make this test pass): My markdown previewer interprets carriage returns and renders them as <br> (line break) elements (HINT: read the Marked.js docs for this one!).

Not exactly sure what you’re question is but I solved it by removing the import for marked and just added the URL for the marked library in the javascript settings of codepen itself. Then I was able to use the marked.parse() method on its own. I also had to make sure that my initial text, which you would see in the textarea, is a template literal, so it supports the multiline breaks in the beginning.

I also added a link to my project.

I didn’t bother with the last test because it was optional (sorry)

Ok, It looks like you got it. Happy coding!

1 Like

Thank you! Also added the user test #7 now by setting the marked option for breaks to true.

1 Like