Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

[BETA][FRONT-END] Markdown Test #5 #304

Closed
vipatron opened this issue Apr 20, 2018 · 0 comments
Closed

[BETA][FRONT-END] Markdown Test #5 #304

vipatron opened this issue Apr 20, 2018 · 0 comments

Comments

@vipatron
Copy link

Issue Description

In the Markdown Previewer, Test #6 (preview HTML has all required elements) passes, but #5(markdown has all elements) doesn't. I wrote about it in depth on the forum, but the TL;DR version:

The issue is that the regex used in by the testing suite bundle.js requires a whitespace character after the right-carat/greater-than ">" symbol, but marked.js doesn't require any whitespace in order to render a blockquote. The testing suite reports that it is at line @https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js:10986:14, but Notepad++ says it is on line 20109. Either way, the search string that will find the relevant line is:
_chai.assert.notStrictEqual(markdown.search(/>\s.+/), -1, 'write some markdown representing a <blockquote> ');

I forked my Codepen to demonstrate the issue. I use a constant string to initialize the markdown textarea, INITIAL_MARKDOWN, which causes the issue. I have another string called WORKING_MARKDOWN, which is identical except that it has a space after the right-carat/greater-than symbol. You can fix the problem by swapping the names for the variables, at which point it will pass all the non-optional tests (7/9).

Browser Information

  • Browser Name, Version: Chrome Version 65.0.3325.181
  • Operating System: Win 8.1, 64-bit
  • Mobile, Desktop, or Tablet: Desktop

Your Code / Link to Your Pen

https://codepen.io/vipatron/pen/VxLdoE?editors=0010

Screenshot

markdown testing error

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant