Free code camp Challenge - Build a Markdown Previewer - App cannot pass 2 tests out of 8

Test 1: When my markdown previewer first loads, the default text in the #editor field should contain a valid markdown that represents at least one of each of the following elements: a header (H1 size), a subheader (H2 size), a link, inline code, a code block, a list item, a blockquote, an image, and bolded text.

Test 2: When my markdown previewer first loads, the default markdown in the #editor field should be rendered as HTML in the #preview element.

My #editor element contains the valid markdown and the #preview element is displaying the correct HTML for the corresponding markdown in the #editor but still, the tests are failing for some reason.

*My code so far

Challenge: Build a Markdown Previewer

Link to the challenge:

I’ve struggled the same issue for a couple hours… And I fix it by using a old version of marked.js , try this:
<script src="" integrity="sha512-t1jq1b5U4hgz4lQoeyRD9QiVu99KxjyA939fnND+R+gLOHmuT5F9YFHJI1Nse1B1QG6/U11SPAc8fshYshb6MA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

Hey TinPoChan,
That worked! Thank you so much.

1 Like

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