Help with Markdown Preview

I’m not able to pass the 6th test
I have also used a console.log() statement at the bottom which clearly should pass the test.
codepen with issue
Also below would have a completely different behaviour.


window.onload=function(){ReactDOM.render(<App/>,document.getElementById('root'))}
console.log(document.querySelectorAll('#preview h1'))

Remove DOMPurify.sanitize

1 Like

That won’t help I’ve tried.

Line 56, change to:

parsedObject:{__html:marked(placeholder)}

How come did this get the code work?

I guess it’s because of marked.setOptions({breaks:true}) - if you put it immediately after const placeholder=... the tests will pass even with the initial version.

1 Like