From e87094754aba46d52edeb8aec814c597c40a38e8 Mon Sep 17 00:00:00 2001 From: junhaoyap Date: Tue, 20 Oct 2015 22:27:27 -0700 Subject: [PATCH] Add stricter check for CSS selectors styling elements --- challenges/html5-and-css.json | 1 + 1 file changed, 1 insertion(+) diff --git a/challenges/html5-and-css.json b/challenges/html5-and-css.json index c54d12541a..e06df93079 100644 --- a/challenges/html5-and-css.json +++ b/challenges/html5-and-css.json @@ -377,6 +377,7 @@ "assert(!$(\"h2\").attr(\"style\"), 'Remove the style attribute from your h2 element.')", "assert($(\"style\") && $(\"style\").length > 1, 'Create a style element.')", "assert($(\"h2\").css(\"color\") === \"rgb(0, 0, 255)\", 'Your h2 element should be blue.')", + "assert(editor.match(/h2\\s*\\{\\s*color:\\s*blue;\\s*\\}/g), 'Ensure that your stylesheet h2 declaration is valid with a semicolon and closing brace')", "assert(editor.match(/<\\/style>/g) && editor.match(/<\\/style>/g).length === (editor.match(//g) || []).length, 'Make sure all your style elements are valid and have a closing tag.')" ], "challengeSeed": [