4. When I enter GitHub flavored markdown into the #editor element, the text is rendered as HTML in the #preview element as I type (Hint: You don't need to parse Markdown yourself - you can import the Marked library for this: https://cdnjs.com/libraries/marked)
Code block where I’m using marked to markdown input text.
Although I’m using marked.js and everything is working as expected (fine) but with this failing test case, I’m not able to figure out where I’m doing wrong. I seek valuable guidance.
Thanks
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0.
This is the key phrase, “…the text is rendered as HTML in the #preview element…” It isn’t very specific, but what it means that it is rendered directly in the #preview element. But you have it in a span that’s a child of that element. This is further confirmed by the rest of the error message, “the text is rendered as HTML in the #preview element as I type#preview’s only children should be those rendered by marked.js …”
So, there should be nothing inside that element, except what marked is going to provide it. See if you can solve it with that information.
Same problem here, but I’m rendering directly into an element. No idea what’s going on here. It took maybe 10 minutes to write, but I’ve spent close to 20 hours trying to figure out how to pass test #4. Either it is a faulty test and needs to be rewritten or FCC is not including all requirements of the test.