freeCodeCamp / curriculum

The freeCodeCamp curriculum and lesson editor
Creative Commons Attribution Share Alike 4.0 International
81 stars 125 forks source link

fix(challenges): Add whitespace check to regex #235

Closed RobAnthony01 closed 6 years ago

RobAnthony01 commented 6 years ago

Add \/\s? to start of looked for code and \s?\/ after semi colon. This traps any extra non-whitespace between the comments.

Description

The tests could still pass if additional text was put between the comments on the solution. This checks to make sure ONLY whitespace and the correct solution is between the comments.

Pre-Submission Checklist

Checklist:

Closes #228