From b017ce192cd4901d207351a7795ccb753d72bd0b Mon Sep 17 00:00:00 2001 From: Kristofer Koishigawa Date: Sat, 9 May 2020 02:27:32 +0900 Subject: [PATCH] fix: dotall flag not supported in firefox (#38762) Addresses https://github.com/freeCodeCamp/freeCodeCamp/pull/38546#issuecomment-625611675 where it's pointed out that Firefox doesn't support the /s regex flag yet. This workaround matches anything that's not blank. --- .../basic-javascript/local-scope-and-functions.english.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.english.md index 42f55aad2c..0f223c304e 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.english.md @@ -43,7 +43,7 @@ tests: } assert.throws(declared, ReferenceError); - text: You should add a local myVar variable. - testString: assert(/functionmyLocalScope\(\)\{.+(var|let|const)myVar.*}/s.test(code.replace(/\s/g, ''))); + testString: assert(/functionmyLocalScope\(\)\{.+(var|let|const)myVar[\s\S]*}/.test(code.replace(/\s/g, ''))); ```