From 70f1ebd2fcc2b95aa6e8b66a45a7cfd603e45354 Mon Sep 17 00:00:00 2001 From: Ashraf Nazar Date: Tue, 1 Sep 2020 02:24:43 +0100 Subject: [PATCH] =?UTF-8?q?fix(curriculum):=20regex=20to=20target=20html?= =?UTF-8?q?=20elements=20using=20jQuery=20to=20captur=E2=80=A6=20(#38649)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(curriculum): regex to target html elements using jQuery to capture white spaces * replace whitespace before test * fix linting issue with single quotes Co-authored-by: Shaun Hamilton <51722130+Sky020@users.noreply.github.com> --- ...target-html-elements-with-selectors-using-jquery.english.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/curriculum/challenges/english/03-front-end-libraries/jquery/target-html-elements-with-selectors-using-jquery.english.md b/curriculum/challenges/english/03-front-end-libraries/jquery/target-html-elements-with-selectors-using-jquery.english.md index b3fc383d41..1a0a3e94d8 100644 --- a/curriculum/challenges/english/03-front-end-libraries/jquery/target-html-elements-with-selectors-using-jquery.english.md +++ b/curriculum/challenges/english/03-front-end-libraries/jquery/target-html-elements-with-selectors-using-jquery.english.md @@ -33,8 +33,7 @@ tests: - text: You should only use jQuery to add these classes to the element. testString: 'assert(!code.match(/class.*animated/g));' - text: Your jQuery code should be within the $(document).ready(); function. - testString: assert(code.match(/\$\(document\)\.ready\(function.*(\s|\n)*.*button.*.addClass.*\);/g)); - + testString: 'assert(code.replace(/\s/g, '''').match(/\$\(document\)\.ready\(function\(\)\{\$/g));' ```