From a9ed95b654f224779b756f7c35c0ab8d264dd522 Mon Sep 17 00:00:00 2001
From: richiethomas <=>
Date: Wed, 25 Jan 2017 17:42:46 -0500
Subject: [PATCH] Prevent 'comment-your-javascript-code' from passing
incorrectly due to multi-line comments which are not visible to users
---
.../basic-javascript.json | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json b/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json
index c73d94542b..69ad41e565 100755
--- a/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json
+++ b/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json
@@ -26,8 +26,7 @@
],
"tests": [
"assert(code.match(/(\\/\\/)...../g), 'message: Create a //
style comment that contains at least five letters.');",
- "assert(code.match(/(\\/\\*)[\\w\\W]{5,}(?=\\*\\/)/gm), 'message: Create a /* */
style comment that contains at least five letters.');",
- "assert(code.match(/(\\*\\/)/g), 'message: Make sure that you close the comment with a */
.');"
+ "assert(code.match(/(\\/\\*)([^\\*\\/]{5,})(?=\\*\\/)/gm), 'message: Create a /* */
style comment that contains at least five letters.');"
],
"type": "waypoint",
"challengeType": 1,
@@ -5719,4 +5718,4 @@
"translations": {}
}
]
-}
\ No newline at end of file
+}