Markdown previewer test 4 issue

Hi all,
the markdowsn previewer I’ve made for the frontend libraries project doesn’t pass test 4, gitHub flavored markdown. I’ve been looking for a solution for a while now but I’m completely lost as to why that’s happening. I suspect it has something to do with how the markedContent function makes use of marked, but I can’t quite figure it out.

Here’s the link https://codepen.io/releasethekraken/pen/rEpKob

Well, that took some time to figure out. It is caused by the smartypants: true option.

I’m guessing the “smart” typographic punctuation for things like quotes and dashes is messing with the text comparison.

If you look closely at the error message you can see it as well.

expected '<p>testing and…</p>' to equal '<p>testing and...</p>'

Oh wow, that was it. Thank you so much :slight_smile:

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