From 349364b5dab9333f2a0d0c85456506513060d108 Mon Sep 17 00:00:00 2001 From: Andre Alonzo Date: Sun, 20 Mar 2016 06:45:18 -0700 Subject: [PATCH] updated to check for spaces before and after class name --- challenges/01-front-end-development-certification/jquery.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/01-front-end-development-certification/jquery.json b/challenges/01-front-end-development-certification/jquery.json index ab5571e2a8..881b6bca42 100644 --- a/challenges/01-front-end-development-certification/jquery.json +++ b/challenges/01-front-end-development-certification/jquery.json @@ -342,7 +342,7 @@ "assert(code.match(/\\$\\s*?\\(\\s*?(?:'|\")\\s*?button\\s*?(?:'|\")/gi), 'message: Use the $(\"button\") selector.');", "assert(code.match(/\\$\\s*?\\(\\s*?(?:'|\")\\s*?\\.btn\\s*?(?:'|\")/gi), 'message: Use the $(\".btn\") selector.');", "assert(code.match(/\\$\\s*?\\(\\s*?(?:'|\")\\s*?#target1\\s*?(?:'|\")/gi), 'message: Use the $(\"#target1\") selector.');", - "assert(code.match(/addClass/g) && code.match(/addClass\\(\\s*?('|\")[\\w-]+\\1\\s*?\\)/g).length > 2, 'message: Only add one class with each of your three selectors.');", + "assert(code.match(/addClass/g) && code.match(/addClass\\(\\s*?('|\")\\s*?[\\w-]+\\s*?\\1\\s*?\\)/g).length > 2, 'message: Only add one class with each of your three selectors.');", "assert($(\"#target1\").hasClass(\"animated\") && $(\"#target1\").hasClass(\"shake\") && $(\"#target1\").hasClass(\"btn-primary\"), 'message: Your #target1 element should have the classes animatedshake and btn-primary.');", "assert(!code.match(/class.*animated/g), 'message: Only use jQuery to add these classes to the element.');" ],