Front End Libraries Markdown Previewer Tests

Does anyone know if there is a glitch in the testing for this exercise? I created a version using Angular and then recreated it using JQuery. Both claim that it is not updating the #preview item when typing into the #editor item. In the jQuerry version I made sure it responds instantly to any typical event changing the content, even dragging text around, etc. Here are the pencode versions, first Angular:

and using JQuery:

Hello, maybe you are having the same problem as I had. See here; Markdown Previewer solution fails Tests 5 and 6 despite functioning as intended

I added:
import { marked } from β€œ”;
to the top of the js file. I am not sure what to remove from settings. If I remove:
then I do not seem to get the popup to run the tests. And I am currently failing 4, 6 and 7 rather than failing 5 and 6.
Test 4 claims that β€œ#preview is not being updated as I type into #editor” but it does update live and the only code changing the display is $("#preview").text(newOutput); which clearly is updating #preview.
Test 6 claims it does not see an "<H1>" tag in #preview but it is right there on the screen.

You could remove the link to marked at settings under js tab, just be sure. Do not remove the link inside js file of course. Also your preview is not actually producing Markdown, but only html. Maybe first try to have preview actually producing Markdown, and see if that fixes the issue. Just a suggestion.

In jQuery you’re using .text() which escapes the HTML tags. To add it as is you should use .html() method.

Thank you. That solved the issue. I misread the assignment.

Thank you. That solved the issue. I misread the assignment. I thought i was producing a translator that would give HTML to copy and use. I left that in as a second column and put the actual preview in the third column.

1 Like

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