Markdown Previewer test 6 failing

I have built Markdown Previewer and everything is working on page, but both test 5 and 6 say that i do not have H1 neither in my editor nor in my previewer.

I have copied initial const from example Pen that was given to us to make sure that i was not making mistake in creating markdown, but still does not work.

Here is my code, please help: https://codepen.io/electronx/pen/ZEXbaMP?editors=0010

thanks.

The only test that is failing for me is the optional test and you don’t need to pass that one to complete this challenge. So I’m guessing you have fixed this since you posted a few hours ago?

Hey mate, yes i fixed it after 4 hours of torture, problem was with marked.js library. In latest version marked does not work as a function directly e.g marked(text) gives you an error “marked is not a function”. I found a way which is marked.parse(text), which works for real purposes, but it does not pass the test.

That’s why i could not find bug for so long because everything worked and yet it did not pass the test. So i just imported older version of marked.js library where marked(text) still works and it did work. Very strange indeed.

Thanks for the support.

Import the marked.js library using the import {marked} from <CDN link here> method instead of adding it in other ways. There is a bug in the test which makes it not latch onto the code properly in other ways.